Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要发送一些大文本文件,在互联网上说 10 兆字节,作为 Json 对象的一个字段。喜欢的东西:
{ "status":0, "fileContent":<File content comes here> }
我必须用 Java+Jackson Json 编写它。将整个文件读入字符串很容易。我已经尝试过了,它有效。但是,是否有任何方法可以将文件内容作为 JSON 对象的字段进行流式传输?因为有些文件可能会变大,所以说最大。20 MB。