JSON-java
JSON-java copied to clipboard
Where is the API documentation?
- in the code no doubt. But I just spent half an hour not finding how to get a named string attribute from a JSONObject... A 'getting started' entry about how easy it is to use this package would not go astray. P
That's on me, there have been other requests for API docs, JavaDocs, etc, but time has not permitted. As luck would have it, I expect to have some cycles available soon, and I love to write documentation, so stay tuned...
In the meanwhile, if you have not already found it, try:
jsonObject.getString("myStringKey");
Caveat: This will throw an exception if the key is not found, or if the value is not a string. When unsure, try this, which will return an empty string if not found:
jsonObject.optString("myStringKey");
Hello @stleary
I have been an active user of this project for over an year and would want this open-source project to live on.
I am actively converting instances of net.sf.json and net.minidev.json usages in our projects at work into (guess what?) org.json exclusively and have documented changes to API calls and challenges observed.
I have been on the lookout to be able to contribute here for a long time and this seems like an opportunity.
- For a start, where do I start rewriting my said list of observations?
README.mdordocs/ - On another note, I suppose the existing documentation site currently serves content from gh-pages branch. Isn't that "The API documentation" being asked for here?
Yes the existing documentation site would have done me! (I just looked at the source code and solved it in 5 minutes but)
A getting started example at the top of the project page for the newbies (with JSONObject.get(String) and put(..)) and a link to that page is all that is needed.
p
On Mon, 5 Oct 2020 at 15:21, Shashank Sabniveesu [email protected] wrote:
Hello @stleary https://github.com/stleary
I have been an active user of this project for over an year and would want this open-source project to live on. I am actively converting instances of net.sf.json and net.minidev.json usages in our projects at work into (guess what?) org.json exclusively and have documented changes to API calls and challenges observed.
I have been on the lookout to be able to contribute here for a long time and this seems like an opportunity.
- For a start, where do I start rewriting my said list of observations? README.md or docs/
- On another note, I suppose the existing documentation site http://stleary.github.io/JSON-java/ currently serves content from gh-pages branch https://github.com/stleary/JSON-java/tree/gh-pages. Isn't that "The API documentation" being asked for here?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stleary/JSON-java/issues/566#issuecomment-703664431, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY3LWJ33QS6L3TQWEA52MDSJHI53ANCNFSM4SBGDP5Q .
The JavaDocs are good for reference, but not as helpful for learning. The readme should have a link to a Getting Started or Quick Start guide in the wiki. The front page of the wiki has a little text on this subject but it was never completed.
I can't find any document or example about convert json data to object
All of my free time to write docs evaporated soon after the Oct posts. Will try to put something together this weekend.
Hi, I need the documentation for a research project, where can I find it?
Please check here: http://stleary.github.io/JSON-java/index.html. If you need some other type of documentation that is not in the Readme or one of the wiki pages, let me know and I will see what I can do.
I have made a simple Java file in which i explain how to get started with all the JSON-types and how to use all conversors to new-comers. Would it be interesting enough to upload it to GitHub and request a merge?
@TheNeoStormZ It is OK to submit a pull request. Normally this information would appear in the readme or a wiki page. If the content is helpful, we can find a place to put it.
Closing due to docs available online. If you still think there is a gap, post here and the issue will be reopened.