开发者

Is there any way to convert Java object to JSON file

开发者 https://www.devze.com 2023-02-17 02:27 出处:网络
Is there any way to convert Java object to JSON file ( I have array of objects and I want to export to JS开发者_如何学GoON file, properties ) >Sure there is, I suggest you to try Google\'s API which p

Is there any way to convert Java object to JSON file ( I have array of objects and I want to export to JS开发者_如何学GoON file, properties ) >


Sure there is, I suggest you to try Google's API which provides a good boxed way to serialize/deserialize data from java objects to JSON and vice-versa.


You can have the related answers here. Go through it.

  • A better Java JSON library?


You can use the JsonParser to convert the Java object to JSON string and you just write that string to a file.

0

精彩评论

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