| 作: | @voluntas |
|---|---|
| バージョン: | 1.0.1 |
| URL: | https://voluntas.github.io/ |
2015 年 1 月 12 日に行われた 「テレビ連動サーバー」勉強会 向けの発表資料です。
| import Foundation | |
| public protocol JSONEncodable: Encodable { | |
| static var keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy { get } | |
| static var dateEncodingStrategy: JSONEncoder.DateEncodingStrategy { get } | |
| static var dataEncodingStrategy: JSONEncoder.DataEncodingStrategy { get } | |
| static var nonConformingFloatEncodingStrategy: JSONEncoder.NonConformingFloatEncodingStrategy { get } | |
| func toJSON() throws -> Data | |
| } |
| 作: | @voluntas |
|---|---|
| バージョン: | 1.0.1 |
| URL: | https://voluntas.github.io/ |
2015 年 1 月 12 日に行われた 「テレビ連動サーバー」勉強会 向けの発表資料です。
| <?php | |
| ob_start(); | |
| header('Content-Type: text/plain;charset=UTF-8'); | |
| $stream = fopen('php://output', 'w'); | |
| fputcsv($stream, array(1, 2, 3)); | |
| fputcsv($stream, array(4, 5, 6)); | |
| // more complex codes would be here. It may cause error. | |
| header("Content-Type: application/octet-stream"); |