Example in XML:
<"someLable">the value within that lable</"someLable">
....
<"relativeLable">&someLable;</"relativeLable">
Example in YAML:
config: &defaults
database: "myBD"
address: locatlhost
developement:
<<*defaults
and in JSON [I have no clue]:
{listOfPeople":{
{"parent1":{"name":"value1","otherName":"otherValue1"},
{"parent2":{"name":listOfPeople.parent2.name,"otherName":"otherValue1"}
};
What would I put in for listOfPeople.parent1.name
I’ve tried wrapping all these versions, but can’t find the right one, or even if it exists in json:
- eval(I’tried self.parent2.name)
- self.parent1.name
- this.parent1.name
- parent1.name
- &parent.name;
- “&parent.name”;
- &”parent”.”name”;
- “&parent;”.”&name;”
- and various other iterations of the previous
Please clear this up for me, and if possible to post a reference for these types of reserved functions in JSON
Here is a use in the rdf:RDF definition
<!DOCTYPE rdf:RDF [
<!ENTITY location "http://www.w3.org/2002/07/owl" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY dc "http://purl.org/dc/elements/1.1/" >
<!ENTITY grddl "http://www.w3.org/2003/g/data-view#" >
<!ENTITY owl "&location;#" >
]>
JSON has no way to automatically refer to previous values. You could add a notation to your own JSON structures, and then write your own code to interpret that notation in your decoded JSON.