IDigBio API v1 Examples: Difference between revisions

add screenshot of jsonview extension
m (change headings to bold)
(add screenshot of jsonview extension)
Line 5: Line 5:
In most cases for these examples we format the output of the JSON document using a "pretty printing" feature of some kind in order to make this document more readable by humans.
In most cases for these examples we format the output of the JSON document using a "pretty printing" feature of some kind in order to make this document more readable by humans.


For example, this is the raw JSON returned by the base URL of the api:
For example, this is the raw JSON returned by the base URL of the API:


<pre>
<pre>
Line 12: Line 12:
</pre>
</pre>


We make this easier to read if we pipe the output through a formatter such as python's json.tool or the json_pp command-line Perl script (JSON::PP).
This becomes easier to read if we pipe the output through a formatter such as python's json.tool or the json_pp command-line Perl script (JSON::PP).


'''json.tool Example'''
'''json.tool Example'''
Line 36: Line 36:
'''JSONView Browser Extension Example'''
'''JSONView Browser Extension Example'''


Here goes a screenshot.
[[File:JSONView_browser_extension_example.png|border|JSONView extension allows easier viewing in a web browser]]


=== Fetch A Single Record from the API ===
=== Fetch A Single Record from the API ===
1,554

edits