Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] [ANN] jsonpat

0 views
Skip to first unread message

Julien Verlaguet

unread,
Mar 29, 2010, 10:41:26 PM3/29/10
to OCaml List
I am proud to announce the first release of Jsonpat.
Jsonpat is a command line tool that allows to write json to json
tranformations, using
pattern-matching, directly in the shell.

For example given the file, myexample.json :
{"name":"ouipk","gender":"M","age":20}
{"name":"Cartwright",
"age":39 }
{"age":24,"name":"Colbert","gender":"M"}

The following command extracts the values present in the field "name":

$ jsonpat -p '{name:x} -> x' myexample.json
"ouipk"
"Cartwright"
"Colbert"

The source code and documentation can be found here:
http://oss.wink.com/jsonpat/

Comments and suggestions are more than welcome.

Julien Verlaguet

0 new messages