Json ld reader writer for rdf rb and fully conforming json ld api processor.
Ruby json load file.
Load a ruby data structure from a json source and return it.
It also extracts json ld from html.
The tin man nov 9 15 at 17 41.
Simply use require json in your code.
Json is a language agnostic lightweight data interchange format.
Additionally this gem implements json ld framing.
To modify the default options pass in the optional options argument as well.
Load a ruby data structure from a json source and return it.
Generating or serializing json in ruby.
If proc was given it will be called with any nested ruby object as an argument recursively in depth first order.
A source can either be a string like object an io like object or an object responding to the read method.
Given below is a ruby program that will be used to parse the above mentioned json document usr bin ruby require rubygems require json require pp json file read input json obj json parse json pp obj on executing it will produce the following result.
Json ld parses and serializes json ld into rdf and implements expansion compaction and framing api interfaces.
Ruby has a built in module that contains methods to generate and parse json.
A source can either be a string like object an io like object or an object responding to the read method.
It s easy to read and understand both by humans and machines.
If proc was given it will be called with any nested ruby object as an argument recursively in depth first order.
Json is directly supported in ruby and has been since at least ruby v1 9 3 so there is no need to install a gem unless you re using something older.