开发者

how to format no line break json file?

开发者 https://www.devze.com 2023-03-23 18:53 出处:网络
This is a continue question by here. Now the problem is, there is no line break in each line. All data stick together, how can I do that?

This is a continue question by here. Now the problem is, there is no line break in each line. All data stick together, how can I do that? Like this:

{"bla":"bla"}{"bla":"bla"}{"开发者_运维技巧bla":"bla"}{"bla":"bla"}{"bla":"bla"}{"bla":"bla"}.....

Thanks!


Read in the JSON file as a single String and replace "}{" with "}\n{". Pass the resulting String into a StringReader and you can read it line by line.

0

精彩评论

暂无评论...
验证码 换一张
取 消