Json
class Json extends RdfPhp
A pure-php class to parse RDF/JSON with no dependencies.
https://www.easyrdf.org/docs/rdf-formats-json
Properties
protected Graph | $graph | from Parser | |
protected | $format | The format of the document currently being parsed | from Parser |
protected | $baseUri | The base URI for the document currently being parsed | from Parser |
protected | $tripleCount | from Parser |
Methods
Check, cleanup parameters and prepare for parsing
Parse RDF/JSON into an EasyRdf\Graph
Add a triple to the current graph, and keep count of the number of triples
Constructor
Return the last JSON parser error as a string
Parse the triple-centric JSON format, as output by libraptor
Details
in
Parser at line 70
protected
remapBnode($name)
Create a new, unique bnode identifier from a source identifier.
If the source identifier has previously been seen, the same new bnode identifier is returned.
in
Parser at line 82
protected
resetBnodeMap()
Delete the bnode mapping - to be called at the start of a new parse
in
Parser at line 91
protected
checkParseParams($graph, $data, $format, $baseUri)
Check, cleanup parameters and prepare for parsing
at line 135
parse($graph, $data, $format, $baseUri)
Parse RDF/JSON into an EasyRdf\Graph
in
Parser at line 148
protected
addTriple($resource, $property, $value)
Add a triple to the current graph, and keep count of the number of triples
at line 56
__construct()
Constructor
at line 67
protected
jsonLastErrorString()
Return the last JSON parser error as a string
If json_last_error() is not available a generic message will be returned.
at line 97
protected
parseJsonTriples($data, $baseUri)
Parse the triple-centric JSON format, as output by libraptor
http://librdf.org/raptor/api/serializer-json.html