IDigBio API v1 Examples: Difference between revisions

Jump to navigation Jump to search
add unix pipe stuff
mNo edit summary
(add unix pipe stuff)
Line 18: Line 18:
If using a command-line tool (such as <code>curl</code>), you may wish to format the output of the JSON document using a "pretty printing" feature of some kind. This will make it more readable by humans and also allow it to be more easily filtered using tools such as <code>grep</code>.
If using a command-line tool (such as <code>curl</code>), you may wish to format the output of the JSON document using a "pretty printing" feature of some kind. This will make it more readable by humans and also allow it to be more easily filtered using tools such as <code>grep</code>.


This becomes easier to read when the output is piped through a formatter such as python's json.tool or the json_pp command-line Perl script (JSON::PP).
Two common tools available on Unix/Linux are python's json.tool or the json_pp command-line Perl script (JSON::PP). These tools can receive input from a pipe in the normal Unix fashion to chain multiple commands together.


'''json.tool Example'''
'''json.tool Example'''
Line 39: Line 39:
}
}
</pre>
</pre>


=== Three ways to fetch a specific record based on iDigBio GUID. ===
=== Three ways to fetch a specific record based on iDigBio GUID. ===
1,554

edits

Navigation menu