description::
Json is a data-representation computer-language.
[HmnSgm.2017-11-03]
===
Json (JavaScript Object Notation) is a lightweight data-interchange format.
It is easy for humans to read and write.
It is easy for machines to parse and generate.
It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.
Json is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others.
These properties make JSON an ideal data-interchange language.
[http://www.json.org/]
name::
* McsEngl.McsTchInf000029.last.html!⇒lagJson,
* McsEngl.dirTchInf/McsTchInf000029.last.html!⇒lagJson,
* McsEngl.JSON!⇒lagJson,
* McsEngl.JavaScript-Object-Nonation-(JSON)!⇒lagJson,
* McsEngl.Json!⇒lagJson,
* McsEngl.lagJson--data-format!⇒lagJson,
* McsEngl.lagJson--data-representation--computer-language!⇒lagJson,
* McsEngl.lagJson-format!⇒lagJson,
* McsEngl.lagJson-language!⇒lagJson,
* McsEngl.lagJson, {2019-07-05},
* McsEngl.lagJson!=McsTchInf000029,
* McsEngl.lagJson!=JavaScript-Object-Nonation,
description::
lagJson-archetype is any information|data (human or computer) we want to represent in JSON-language.
The-JSON-language most is-used to represent data of different computer-languages for inter-language communication.
description::
Jsondocument is a-document written in JSON-language that represents a-JSON-archetype.
name::
* McsEngl.Jsondoc,
* McsEngl.lagJson'doc!⇒Jsondoc,
* McsEngl.lagJson'document!⇒Jsondoc,
* McsEngl.lagJson'model!⇒Jsondoc,
* McsEngl.lagJson-doc!⇒Jsondoc,
description::
lagJson-unit is any symbol we use to construct a-JSON-doc.
- { } [ ] " , whitespace
- character-symbol
- number-symbol
Units do NOT represent something in archetype.
name::
* McsEngl.Jsondoc'unit,
* McsEngl.lagJson-unit,
whitespace::
Whitespace can be inserted between any pair of tokens.
[http://www.json.org/]
description::
Semantic-units are unit constructs that REPRESENT something in archetype.
name::
* McsEngl.Jsondoc'semantic-unit!⇒Jsonsunt,
* McsEngl.Jsonsunt,
* McsEngl.lagJson'semantic-unit!⇒Jsonsunt,
* McsEngl.lagJson-Sunt!⇒Jsonsunt,
* McsEngl.semantic-unit.JSON!⇒Jsonsunt,
Specific::
There-are only 6 semantic-units.
1) null--semantic-unit,
2) Boolean--semantic-unit,
3) String--semantic-unit,
4) Number--semantic-unit,
5) Array--semantic-unit,
6) Object--semantic-unit,
description::
null
is a-genericNo semantic-unit that represents 'zero'-information.
name::
* McsEngl.Jsonnull,
* McsEngl.Jsonsunt.null,
* McsEngl.lagJson'null,
description::
Boolean is a-generic semantic-unit with specifics true
and false
.
name::
* McsEngl.Jsonbool,
* McsEngl.Jsonsunt.boolean,
* McsEngl.Jsonsunt.false,
* McsEngl.Jsonsunt.true,
* McsEngl.lagJson'boolean,
* McsEngl.lagJson'false,
* McsEngl.lagJson'true,
description::
A-string is a-generic semantic-unit that represents human-text enclosed in double-quotes.
Example: "some text"
"some \"text\" with escapes"
[HmnSgm.2017-11-03]
===
A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes.
A character is represented as a single character string.
A string is very much like a C or Java string.
[http://www.json.org/]
name::
* McsEngl.Jsonstr,
* McsEngl.Jsonsunt.string,
* McsEngl.lagJson'string,
string
""
" chars "
char
any-Unicode-character-except-"-or-\-or-control-character
\"
\\
\/
\b
\f
\n
\r
\t
\u four-hex-digits
description::
A-number is a-generic semantic-unit that represents numbers.
Example: 123
1.2
123e3
1.2e3
[HmnSgm.2017-11-03]
===
A number is very much like a C or Java number, except that the octal and hexadecimal formats are not used.
[http://www.json.org/]
name::
* McsEngl.Jsonnbr,
* McsEngl.Jsonsunt.number,
* McsEngl.lagJson'number,
number
int
int frac
int exp
int frac exp
int
digit
digit1-9 digits
- digit
- digit1-9 digits
frac
. digits
description::
· array is a-generic semantic-unit which contains an-ordered-set of NON-NAMED semantic-units.
Example: ["string", 5, [1, 2], true]
[HmnSgm.2017-11-03]
===
An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
...
An array is an ordered collection of values.
An array begins with [ (left bracket) and ends with ] (right bracket).
Values are separated by , (comma).
[http://www.json.org/]
name::
* McsEngl.Jsonarr,
* McsEngl.Jsonsunt.array,
* McsEngl.lagJson'array,
* McsEngl.lagJson'list,
* McsEngl.lagJson'sequence,
* McsEngl.lagJson'vector,
* McsEngl.lagJson-array,
name::
* McsEngl.Jsonarr'grammar,
array
[]
[ elements ]
description::
· object is a-generic semantic-unit which contains an-unordered-set of NAMED semantic-units.
Example:
{
"string": "some text",
"number": 123,
"array": [1, 2, 3],
"boolean": true,
"object": {"name": "a name", "phone": 1234567890}
}
[HmnSgm.2017-11-03]
===
A collection of name/value pairs.
In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
...
An object is an unordered set of name/value pairs.
An object begins with { (left brace) and ends with } (right brace).
Each name is followed by : (colon) and the name/value pairs are separated by , (comma).
[http://www.json.org/]
name::
* McsEngl.Jsonojt,
* McsEngl.Jsonsunt.object!⇒Jsonojt,
* McsEngl.lagJson'associative-array!⇒Jsonojt,
* McsEngl.lagJson'dictionary!⇒Jsonojt,
* McsEngl.lagJson'hash-table!⇒Jsonojt,
* McsEngl.lagJson'keyed-list!⇒Jsonojt,
* McsEngl.lagJson'object!⇒Jsonojt,
* McsEngl.lagJson'record!⇒Jsonojt,
* McsEngl.lagJson'struct!⇒Jsonojt,
* McsEngl.lagJson-object!⇒Jsonojt,
name::
* McsEngl.Jsonojt'grammar,
object
{}
{ members }
description::
The-syntax-tree of a-document is a-whole-part-tree with the components of a-document.
The outer most construct of a-JSON-doc is an-object or an-array.
description::
· Jsonschema is a-Json-document that describes the-content of a-non-schema-Jsondoc.
· for example, this schema
{
"type": "object",
"properties": {
"name": { "type": "string" },
"birthday": { "type": "string" },
"address": { "type": "string" }
}
}
describes this doc
{
"name": "George Washington",
"birthday": "February 22, 1732",
"address": "Mount Vernon, Virginia, United States"
}
[http://json-schema.org/understanding-json-schema/about.html]
name::
* McsEngl.Jsondoc'schema!⇒Jsonschema,
* McsEngl.Jsonschema,
* McsEngl.lagJson'schema!⇒Jsonschema,
* McsEngl.schema-of-Jsondoc!⇒Jsonschema,
Specific::
There-are infinite JSON-docs out there.
* http://json.org/example.html,
* package.json-of-npm,
description::
Tool is-called any program used for JSON manipulation.
name::
* McsEngl.lagJson'program,
* McsEngl.lagJson'tool,
Specific::
* per programing-language: http://www.json.org/,
* editor: https://jsonformatter.org/json-editor,
* editor: http://www.jsoneditoronline.org/,
* validator: https://jsonlint.com/,
description::
· Javascript is a-programing-language.
· Json is a-data-representation-language with no data-processing functionality.
· but the-semantic-units-of-Json much that of Javascript.
description::
Both JSON and YAML aim to be human readable data interchange formats.
However, JSON and YAML have different priorities.
Json’s foremost design goal is simplicity and universality.
Thus, JSON is trivial to generate and parse, at the cost of reduced human readability.
It also uses a lowest common denominator information model, ensuring any JSON data can be easily processed by every modern programming environment.
In contrast, YAML’s foremost design goals are human readability and support for serializing arbitrary native data structures.
Thus, YAML allows for extremely readable files, but is more complex to generate and parse.
In addition, YAML ventures beyond the lowest common denominator data types, requiring more complex processing when crossing between different programming environments.
[http://www.yaml.org/spec/1.2/spec.html]
description::
The XML specification does not MATCH the data model for most programming languages which makes it slow and tedious for programmers to parse. Compared to JSON, XML has a low data-to-markup ratio which results in it being more difficult for humans to read and write.
[http://www.json.com/]
name::
* McsEngl.lagJson'relation-to-XML,
* McsEngl.lagXml0'relation-to-JSON,
name::
* McsEngl.lagJson-resource,
AddressWpg::
* http://www.json.org/,
* https://en.wikipedia.org/wiki/JSON,
description::
* {2017-12} https://tools.ietf.org/html/rfc8259,
* {2014-03} RFC-7159,
* ECMA-404,
name::
* McsEngl.lagJson'evoluting,
{2002}::
A number of people independently discovered that JavaScript's object literals were an ideal format for transmitting object-oriented data across the network.
I made my own discovery in April of 2001 when I was CTO of State Software.
In 2002 I acquired the json.org domain and put up a page describing the format.
With no other effort on my part, JSON has been widely adopted by people who found that it made it a lot easier to produce distributed applications and services.
The original page has been translated into Chinese, French, German, Italian, Japanese, Korean, and Spanish.
Json has been formalized in RFC 4627.
The MIME Media Type is application/json.
[http://www.json.org/fatfree.html]
description::
* GeoJSON,
* JSON-LD,
* JSON-RPC,
* JSON-stat,
* JsonML,
* Smile (data interchange format),
* UBJSON,
description::
"JSON-LD is a lightweight Linked Data format.
It is easy for humans to read and write.
It is based on the already successful JSON format and provides a way to help JSON data interoperate at Web-scale.
JSON-LD is an ideal data format for programming environments, REST Web services, and unstructured databases such as Apache CouchDB and MongoDB."
[{2020-12-30} https://json-ld.org/]
name::
* McsEngl.JSON-LD!⇒Jnld,
* McsEngl.Jnld,
* McsEngl.Jnld!=JSON-LD,
descriptionLong::
"JSON-LD [JSON-LD] provides a JSON syntax for RDF graphs and datasets. JSON-LD can be used to transform JSON documents to RDF with minimal changes. JSON-LD offers universal identifiers for JSON objects, a mechanism in which a JSON document can refer to an object described in another JSON document elsewhere on the Web, as well as datatype and language handling. JSON-LD also provides a way to serialize RDF datasets through the use of the @graph keyword."
[{2021-01-03} https://www.w3.org/TR/2014/NOTE-rdf11-primer-20140624/#section-json-ld]
description::
"The encoding is used by Schema.org,[7] Google Knowledge Graph,[8] and used mostly for search engine optimization activities.
It has also been used for applications such as Biomedical Informatics,[9] and representing provenance information.[10]
It is also the basis of Activity Streams, a format for "the exchange of information about potential and completed activities",[11] and is used in ActivityPub, the federated social networking protocol.[12]
Additionally, it is used in the context of Internet of things(IoT), where a Thing Description,[13] which is a JSON-LD document, describes the network facing interfaces of IoT devices."
description::
"A JSON-LD document is always a valid JSON document. This ensures that all of the standard JSON libraries work seamlessly with JSON-LD documents."
[{2020-12-31} https://www.w3.org/TR/json-ld/#design-goals-and-rationale]
name::
* McsEngl.Jnld'document!⇒Jnlddoc,
* McsEngl.Jnld'output-info!⇒Jnlddoc,
* McsEngl.Jnlddoc,
description::
1 {
02 "@context": "example-context.json",
03 "@id": "http://example.org/bob#me",
04 "@type": "Person",
05 "birthdate": "1990-07-04",
06 "knows": "http://example.org/alice#me",
07 "interest": {
08 "@id": "http://www.wikidata.org/entity/Q12418",
09 "title": "Mona Lisa",
10 "subject_of": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619",
11 "creator": "http://dbpedia.org/resource/Leonardo_da_Vinci"
12 }
13 }
encodes the-graph:
<Bob> <is a> <person>.
<Bob> <is a friend of> <Alice>.
<Bob> <is born on> <the 4th of July 1990>.
<Bob> <is interested in> <the Mona Lisa>.
<Leonardo da Vinci> <is the creator of> <the Mona Lisa>.
<The video 'La Joconde à Washington'> <is about> <the Mona Lisa>
description::
* https://json-ld.org/,
* https://www.w3.org/TR/json-ld/,
{2014-01-16}-Jnld-W3c-recommendation::
"It is a W3C Recommendation as of 16 January 2014."
[{2020-12-30} https://json-ld.org/]
description::
· JSON-stat is a-lagJson dialect that maps statistical-table-data, developed by Xavier-Badosa.
===
"Until the introduction of JSON-stat, the main statistical standards for data and metadata exchange were XML-based: they were usually complicated and verbose.
JSON-stat is a simple lightweight JSON dissemination format best suited for data visualization, mobile apps or open data initiatives, that has been designed for all kinds of disseminators.
JSON-stat also proposes an HTML microdata schema to enrich HTML tables and put the JSON-stat vocabulary in the browser."
[{2020-12-28} https://json-stat.org/]
name::
* McsEngl.JSON-stat-format!⇒Jnst,
* McsEngl.Jnst,
* McsEngl.Jnst!=JSON-stat,
* McsEngl.Jnst-format!⇒Jnst,
* McsEngl.Jsondoc.JSON-stat!⇒Jnst,
* McsEngl.Jsonstat!⇒Jnst,
description::
· the-archetype|input-info of Jnst is a-table-data-structure.
description::
· the-output of Jnst is a-Json-doc that contains a-Json-object and represents the-input-table in a-machine readable format.
name::
* McsEngl.Jnst'document,
* McsEngl.Jnst'output,
description::
· a-Jnst-document is a-json-object with NAMED json-semantic-units.
name::
* McsEngl.Jnstname,
* McsEngl.Jnstname!=Jnst'name,
* McsEngl.Jnst'name!⇒Jnstname,
* McsEngl.Jnst'property!⇒Jnstname,
description::
* category,
* child,
* class,
* coordinates,
* decimals,
* dimension,
* dimension-ID,
* error,
* extension,
* geo,
* href,
* id,
* index,
* link,
* metric,
* note,
* position,
* relation-ID,
* role,
* size,
* source,
* status,
* symbol,
* time,
* type,
* unit,
* updated,
* value,
* version,
description::
"It declares the JSON-stat version of the response. The goal of this property is to help clients parsing that particular response.
{
"version" : "2.0",
…
}
Because future versions could add optional properties, the same response can be valid in several versions: any of such versions is accepted as a value of version.
Before version 2.0
version was introduced in version 2.0. That’s why this property can’t accept values lower than 2.0."
[{2020-12-28} https://json-stat.org/format/#version]
× aJsonsunt: [string]
× bRequired: true
× nSince: 2.0
× sParent: root
× sChild: none
name::
* McsEngl.Jnstversion,
* McsEngl.Jnstname.version!⇒Jnstversion,
* McsEngl.Jnst'version!⇒Jnstversion,
description::
"JSON-stat supports several classes of responses. Possible values of class are: dataset, dimension and collection.
Dataset responses include a single dataset. They are declared using the dataset class value."
[{2020-12-29} https://json-stat.org/format/#class]
× aJsonsunt: [string]
× bRequired: false
× nSince: 1.1
× sParent: root, relation-ID array element
× sChild: none
name::
* McsEngl.Jnstclass,
* McsEngl.Jnstname.class!⇒Jnstclass,
* McsEngl.Jnst'class!⇒Jnstclass,
description::
"It specifies a URL.
Providers can use this property to avoid sending information that is shared between different requests (for example, dimensions)."
[{2020-12-29} https://json-stat.org/format/#href]
× aJsonsunt: [string]
× bRequired: false
× nSince: 1.1
× sParent: root, dimension-ID, relation-ID array element
× sChild: none
name::
* McsEngl.Jnsthref,
* McsEngl.Jnstname.href!⇒Jnsthref,
* McsEngl.Jnst'href!⇒Jnsthref,
description::
"It is used to assign a very short (one line) descriptive text to IDs at different levels of the response tree. It is language-dependent.
When it is a root property or a child of dimension-ID or of a unit category ID, it is a string."
[{2020-12-29} https://json-stat.org/format/#label]
× aJsonsunt: [string, object]
× bRequired: true
× nSince: 1.0
× sParent: root, dimension-ID, category, unit category ID, relation-ID array element
× sChild: none
name::
* McsEngl.Jnstlabel,
* McsEngl.Jnstname.label!⇒Jnstlabel,
* McsEngl.Jnst'label!⇒Jnstlabel,
description::
"It contains a language-dependent short text describing the source of the dataset."
[{2020-12-29} https://json-stat.org/format/#source]
× aJsonsunt: [string]
× bRequired: false
× nSince: 1.0
× sParent: root, dimension-ID, relation-ID array element
× sChild: none
name::
* McsEngl.Jnstsource,
* McsEngl.Jnstname.source!⇒Jnstsource,
* McsEngl.Jnst'source!⇒Jnstsource,
description::
"It contains the update time of the dataset. It is a string representing a date in an ISO 8601 format recognized by the Javascript Date.parse method (see ECMA-262 Date Time String Format)."
[{2020-12-29} https://json-stat.org/format/#updated]
× aJsonsunt: [string]
× bRequired: false
× nSince: 1.0
× sParent: root, dimension-ID, relation-ID array element
× sChild: none
name::
* McsEngl.Jnstupdated,
* McsEngl.Jnstname.updated!⇒Jnstupdated,
* McsEngl.Jnst'updated!⇒Jnstupdated,
description::
"It contains the data sorted according to the dataset dimensions. It usually takes the form of an array where missing values are expressed as nulls.
... When too many cube cells are empty (sparse cube), the value array is populated with nulls.
... To avoid this, the value property can take the form of an object.
Value order follows the “What does not change, first” criterion. According to this criterion, values are ordered by combination of category dimensions keeping fixed the first categories of the first dimensions and iterating through the categories of the last dimension in the id array (and so forth).
For example, if we have three dimensions (A, B and C) with 3, 2 and 4 categories respectively, the values should be ordered iterating first by the 4 categories of C, then by the 2 categories of B and finally by the 3 categories of A:
A1B1C1 A1B1C2 A1B1C3 A1B1C4
A1B2C1 A1B2C2 A1B2C3 A1B2C4
A2B1C1 A2B1C2 A2B1C3 A1B1C4
A2B2C1 A2B2C2 A2B2C3 A2B2C4
A3B1C1 A3B1C2 A3B1C3 A3B1C4
A3B2C1 A3B2C2 A3B2C3 A3B2C4
This flattening method is known as row-major order."
[{2020-12-29} https://json-stat.org/format/#value]
× aJsonsunt: [array, object]
× bRequired: true
× nSince: 1.0
× sParent: root (when class "dataset"), relation-ID array element
× sChild: none
name::
* McsEngl.Jnstvalue,
* McsEngl.Jnstname.value!⇒Jnstvalue,
* McsEngl.Jnst'value!⇒Jnstvalue,
description::
"JSON-stat follows a cube model: the values are organized in cells, and a cell is the intersection of various dimensions. The dimension property contains information about the dimensions of the dataset.
dimension must have properties (see dimension-ID) with the same names of each element in the id array.
Before version 2.0
Properties id, size and role were children of dimension."
[{2020-12-29} https://json-stat.org/format/#dimension]
× aJsonsunt: [object]
× bRequired: true
× nSince: 1.0
× sParent: root (when class "dataset"), relation-ID array element
× sChild: dimension-ID
name::
* McsEngl.Jnstdimension,
* McsEngl.Jnstname.dimension!⇒Jnstdimension,
* McsEngl.Jnst'dimension!⇒Jnstdimension,
description::
"It is used to describe a particular dimension. The name of this object must be one of the strings in the id array. There must be one and only one dimension-ID object for every dimension in the id array.
"dimension" : {
"metric" : { … },
"time" : { … },
"geo" : { … },
"sex" : { … },
…
}"
× aJsonsunt: [array]
× bRequired: true
× nSince: 1.0
× sParent: dimension
× sChild: category, label, class
name::
* McsEngl.JnstdimensionID,
* McsEngl.Jnstname.dimension-ID!⇒JnstdimensionID,
* McsEngl.Jnst'dimensionID!⇒JnstdimensionID,
description::
"It contains an ordered list of dimension-IDs.
"class": "dataset",
"id" : ["metric", "time", "geo", "sex"],
Dimension IDs can be any string and have no special meaning in JSON-stat. Use role to assign a particular meaning to them.
Before version 2.0
Properties id, size and role were children of dimension.
Data providers that depend on JSON-stat libraries that are not yet 2.0-ready are advised, as a transitional strategy, to include those three properties at the root level (2.0) and as children of dimension (<2.0)."
[{2020-12-29} https://json-stat.org/format/#id]
× aJsonsunt: [array]
× bRequired: true
× nSince: 1.0
× sParent: root (when class "dataset"), relation-ID array element
× sChild: none
name::
* McsEngl.Jnstid,
* McsEngl.Jnstname.id!⇒Jnstid,
* McsEngl.Jnst'id!⇒Jnstid,
description::
"It contains the number (integer) of categories (possible values) of each dimension in the dataset. It has the same number of elements and in the same order as in id.
...
"id" : ["metric", "time", "geo", "sex"],
"size" : [1, 1, 1, 3],
...
Before version 2.0
Properties id, size and role were children of dimension.
Data providers that depend on JSON-stat libraries that are not yet 2.0-ready are advised, as a transitional strategy, to include those three properties at the root level (2.0) and as children of dimension (<2.0)."
[{2020-12-29} https://json-stat.org/format/#size]
× aJsonsunt: [array]
× bRequired: true
× nSince: 1.0
× sParent: root (when class "dataset"), relation-ID array element
× sChild: none
name::
* McsEngl.Jnstsize,
* McsEngl.Jnstname.size!⇒Jnstsize,
* McsEngl.Jnst'size!⇒Jnstsize,
description::
"It is used to describe the possible values of a dimension."
× aJsonsunt: [object]
× bRequired: true
× nSince: 1.0
× sParent: root (when class "dimension"), dimension-ID, relation-ID array element
× sChild: index, label, child, coordinates, unit
name::
* McsEngl.Jnstcategory,
* McsEngl.Jnstname.category!⇒Jnstcategory,
* McsEngl.Jnst'category!⇒Jnstcategory,
description::
"It is used to describe the hierarchical relationship between different categories. It takes the form of an object where the key is the ID of the parent category and the value is an array of the IDs of the child categories. It is also a way of exposing a certain category as a total."
[{2020-12-29} https://json-stat.org/format/#child]
× aJsonsunt: [object]
× bRequired: false
× nSince: 1.0
× sParent: category
× sChild: none
name::
* McsEngl.Jnstchild,
* McsEngl.Jnstname.child!⇒Jnstchild,
* McsEngl.Jnst'child!⇒Jnstchild,
description::
"It can be used to assign longitude/latitude geographic coordinates to the categories of a dimension with a geo role. It takes the form of an object where keys are category IDs and values are an array of two numbers (longitude, latitude).
"category" : {
"label" : {
"ISO-3166-2:TV" : "Tuvalu"
},
"coordinates" : {
"ISO-3166-2:TV" : [179.1995, -8.5199]
}
}
The goal of JSON-stat is not to provide rich geographical information. To that purpose, use GeoJSON or TopoJSON and match your maps areas in those formats with statistical data (in JSON-stat) encoding your geographical categories with common IDs."
[{2020-12-29} https://json-stat.org/format/#coordinates]
× aJsonsunt: [object]
× bRequired: false
× nSince: 1.0
× sParent: category
× sChild: none
name::
* McsEngl.Jnstcoordinates,
* McsEngl.Jnstname.coordinates!⇒Jnstcoordinates,
* McsEngl.Jnst'coordinates!⇒Jnstcoordinates,
description::
"It is used to order the possible values (categories) of a dimension. The order of the categories and the order of the dimensions themselves determine the order of the data in the value array. While the dimensions’ order has only this functional role (and therefore any order chosen by the provider is valid), the categories’ order has also a presentation role: it is assumed that the categories are sorted in a meaningful order and that the consumer can rely on it when displaying the information. For example, categories in dimensions with a time role are assumed to be in chronological order.
To provide the category IDs and their order, an array can be used.
"sex" : {
"category" : {
"index" : ["M", "F", "T"]
}
}
For efficiency reasons (see Arrays vs. Objects), an object that attaches a position to every ID can also be used (this is currently the recommended format).
"sex" : {
"category" : {
"index" : {
"M" : 0,
"F" : 1,
"T" : 2
}
}
}
index is required unless the dimension is a constant dimension (dimension with a single category). When a dimension has only one category, the index property is indeed unnecessary. In the case that a category index is not provided, a category label must be included."
[{2020-12-29} https://json-stat.org/format/#index]
× aJsonsunt: [object, array]
× bRequired: false
× nSince: 1.0
× sParent: category
× sChild: none
name::
* McsEngl.Jnstindex,
* McsEngl.Jnstname.index!⇒Jnstindex,
* McsEngl.Jnst'index!⇒Jnstindex,
description::
"It can be used to assign unit of measure metadata to the categories of a dimension with a metric role.
"role": {
"metric": ["concept"]
}
It takes the form of an object where category ID is the key and the value is an object.
"concept" : {
"category" : {
"label" : {
"pop" : "population"
},
"unit" : {
"pop" : { … }
}
}
}
Four properties of this object are currently closed: decimals, label, symbol and position.
"unit" : {
"exp" : {
"decimals": 1,
"label" : "millions",
"symbol" : "$",
"position" : "start"
}
}
Following the previous example, a client could display a value of 10 of metric exp as “$10.0 millions”.
Based on current standards and practices, other properties of this object could be:
* base: It is the base unit (person, gram, euro, etc.).
* type: This property should probably help deriving new data from the data. It should probably help answering questions like: does it make sense to add two different cell values? Some possible values of this property could be count or ratio. Some might also consider as possible values things like currency, mass, length, time, etc.
* multiplier: It is the unit multiplier. It should help comparing data with the same base unit but different multiplier. If a decimal system is used, it can be expressed as powers of 10 (0=1, 1=10, -1=0.1, etc.).
* adjustment: A code to express the time series adjustment (for example, seasonally adjusted or adjusted by working days) or indices adjustment (for example, chain-linked indices).
These properties are currently open. Data providers are free to use them on their own terms, although it is safer to do it under extension."
[{2020-12-29} https://json-stat.org/format/#unit]
× aJsonsunt: [object]
× bRequired: false
× nSince: 1.0
× sParent: category
× sChild: category-ID
name::
* McsEngl.Jnstunit,
* McsEngl.Jnstname.unit!⇒Jnstunit,
* McsEngl.Jnst'unit!⇒Jnstunit,
description::
"It contains a possible unit symbol to add to the value when it is displayed (like “€”, “$” or “%”)."
[{2020-12-29} https://json-stat.org/format/#symbol]
× aJsonsunt: [string]
× bRequired: false
× nSince: 1.2
× sParent: Unit category ID
× sChild: none
name::
* McsEngl.Jnstsymbol,
* McsEngl.Jnstname.symbol!⇒Jnstsymbol,
* McsEngl.Jnst'symbol!⇒Jnstsymbol,
description::
"It contains the place (start or end, strings) where the unit symbol should be written (before or after the value). Default is end."
[{2020-12-29} https://json-stat.org/format/#position]
× aJsonsunt: [string]
× bRequired: false
× nSince: 1.2
× sParent: Unit category ID
× sChild: none
name::
* McsEngl.Jnstposition,
* McsEngl.Jnstname.position!⇒Jnstposition,
* McsEngl.Jnst'position!⇒Jnstposition,
description::
"It contains the number of unit decimals (integer). If unit is present, decimals is required."
[{2020-12-29} https://json-stat.org/format/#decimals]
× aJsonsunt: [number]
× bRequired: false
× nSince: 1.2
× sParent: Unit category ID
× sChild: none
name::
* McsEngl.Jnstdecimals,
* McsEngl.Jnstname.decimals!⇒Jnstdecimals,
* McsEngl.Jnst'decimals!⇒Jnstdecimals,
description::
"Besides using HTTP status codes, JSON-stat documents can include the error property to communicate response errors. It takes the form of an array of objects, each providing information for an error. Libraries should offer a method to retrieve this array but should also check the validity of the response, as the inclusion of error is not mandatory.
Based on current standards and practices, possible error elements could be:
* status: The HTTP status code (for example, "401").
* id: The provider’s internal error code (for example, "106").
* href: A link to a web page where information about this error is published (for example, "http://example.com/error/106").
* label: A short descriptive text about the error. It can be useful to provide two properties: one for the end user ("The selected country does not exist.") and one for the developer ("Parameter 'area' must be an ISO 3166-1 alpha-2 code.")."
[{2020-12-29} https://json-stat.org/format/#error]
× aJsonsunt: [array]
× bRequired: false
× nSince: 1.1
× sParent: root
× sChild: open
name::
* McsEngl.Jnsterror,
* McsEngl.Jnstname.error!⇒Jnsterror,
* McsEngl.Jnst'error!⇒Jnsterror,
description::
"It is used to provide a list of links related to a dataset or a dimension, sorted by relation (see relation-ID).
{
"version" : "2.0",
"class" : "dataset",
"label" : "Tuvalu population by sex in the 2002 Census",
"href" : "http://example.com/2002/population/sex",
"link" : {
"alternate" : [
{
"type" : "text/csv",
"href" : "http://example.com/2002/population/sex.csv"
}
],
…
},
…
}"
[{2020-12-29} https://json-stat.org/format/#link]
× aJsonsunt: [object]
× bRequired: false
× nSince: 1.1
× sParent: root, dimension-ID, relation-ID array element
× sChild: none
name::
* McsEngl.Jnstlink,
* McsEngl.Jnstname.link!⇒Jnstlink,
* McsEngl.Jnst'link!⇒Jnstlink,
description::
"This ID must be an IANA link relation name that describes the relation between the elements of the array and the parent of link.
When used to link to non-JSON-stat documents, the elements of the array are objects that can contain a type and an href property.
{ "version" : "2.0", "class" : "dataset", "link" : { "alternate" : [ { "type" : "text/csv", "href" : "http://example.com/2002/population/sex.csv" }, { "type" : "text/html", "href" : "http://example.com/2002/population/sex.html" } ], … }, … } When used to link to JSON-stat documents, they can contain the common JSON-stat properties class, label, href and extension. { "version" : "2.0", "class" : "collection", "href" : "https://json-stat.org/samples/collection.json", "label" : "JSON-stat Dataset Sample Collection", "updated" : "2015-07-02", "link" : { "item" : [ { "class" : "dataset", "href" : "https://json-stat.org/samples/oecd.json", "label" : "Unemployment rate in the OECD countries 2003-2014" }, { "class" : "dataset", "href" : "https://json-stat.org/samples/canada.json", "label" : "Population by sex and age group. Canada. 2012" }, { "class" : "dataset", "href" : "https://json-stat.org/samples/galicia.json", "label" : "Population by province of residence, place of birth, age, gender and year in Galicia" }, { "class" : "dataset", "href" : "https://json-stat.org/samples/us-gsp.json", "label" : "US States by GSP and population" }, { "class" : "dataset", "href" : "https://json-stat.org/samples/us-unr.json", "label" : "Unemployment Rates by County, 2012 Annual Averages" }, { "class" : "dataset", "href" : "https://json-stat.org/samples/us-labor.json", "label" : "Labor Force Data by County, 2012 Annual Averages" }, { "class" : "dataset", "href" : "https://json-stat.org/samples/order.json", "label" : "Demo of value ordering: what does not change, first" }, { "class" : "dataset", "href" : "https://json-stat.org/samples/hierarchy.json", "label" : "Demo of hierarchical dimension" } ] } } They can also be used to embed full JSON-stat responses of any class. { "version" : "2.0", "class" : "collection", "href" : "https://json-stat.org/samples/oecd-canada-col.json", "label" : "OECD-Canada Sample Collection", "updated" : "2015-12-24", "link" : { "item" : [ { "class" : "dataset", "href" : "https://json-stat.org/samples/oecd.json", "label" : "Unemployment rate in the OECD countries 2003-2014", "source" : "Economic Outlook No 92 - December 2012 - OECD Annual Projections", "updated" : "2012-11-27", "value" : [5.943826289, 5.39663128, 5.044790587, …], "id" : ["concept", "area", "year"], "size" : [1, 36, 12], "dimension" : { … }, … }, … ] } }, … }"
· external-word
× aJsonsunt: [array]
× bRequired: false
× nSince: 1.1
× sParent: link
× sChild: none
name::
* McsEngl.JnstrelationID,
* McsEngl.Jnstname.relation-ID!⇒JnstrelationID,
* McsEngl.Jnst'relationID!⇒JnstrelationID,
description::
"This is a property similar to label. The main differences are:
note is used to assign annotations instead of a descriptive text where label uses a string, note uses an array of strings Please, see label for a general description.
{
"version" : "2.0",
"class" : "dataset",
"note" : [ "Most of the data in this dataset ..." ],
"dimension" : {
"country" : {
"note" : [ "Except where otherwise ..." ],
"category" : {
"note" : {
"DEU" : [ "Germany (code DEU) ..." ]
},
…
},
…
},
…
},
…
}
note allows to assign annotations to datasets (array), dimensions (array) and categories (object). To assign annotations to individual data, use status."
[{2020-12-29} https://json-stat.org/format/#note]
× aJsonsunt: [array, object]
× bRequired: false
× nSince: 1.1
× sParent: none, dimension-ID, category, relation-ID array element
× sChild: none
name::
* McsEngl.Jnstnote,
* McsEngl.Jnstname.note!⇒Jnstnote,
* McsEngl.Jnst'note!⇒Jnstnote,
description::
"It can be used to assign special roles to dimensions. At this moment, possible roles are: time, geo and metric. A role can be shared by several dimensions.
{
"version" : "2.0",
"class" : "dataset",
"id" : ["concept", "arrivaldate", "departuredate", "origin", "destination"],
"size" : [1, 24, 24, 10, 10],
"role": {
"time": ["arrivaldate", "departuredate"],
"geo": ["origin", "destination"],
"metric": ["concept"]
},
…
}
Before version 2.0
Properties id, size and role were children of dimension.
Data providers that depend on JSON-stat libraries that are not yet 2.0-ready are advised, as a transitional strategy, to include those three properties at the root level (2.0) and as children of dimension (<2.0)."
[{2020-12-29} https://json-stat.org/format/#role]
× aJsonsunt: [object]
× bRequired: false
× nSince: 1.0
× sParent: root (when class "dataset"), relation-ID array element
× sChild: time, geo and metric
name::
* McsEngl.Jnstrole,
* McsEngl.Jnstname.role!⇒Jnstrole,
* McsEngl.Jnst'role!⇒Jnstrole,
description::
"It can be used to assign a spatial role to one or more dimensions. It takes the form of an array of dimension-IDs in which order does not have a special meaning.
"role": {
"geo": ["origin", "destination"]
}"
[{2020-12-29} https://json-stat.org/format/#geo]
× aJsonsunt: [array]
× bRequired: false
× nSince: 1.0
× sParent: role
× sChild: none
name::
* McsEngl.Jnstgeo,
* McsEngl.Jnstname.geo!⇒Jnstgeo,
* McsEngl.Jnst'geo!⇒Jnstgeo,
description::
"It can be used to assign a time role to one or more dimensions. It takes the form of an array of dimension-IDs in which order does not have a special meaning.
"role": {
"time": ["arrivaldate", "departuredate"]
}"
[{2020-12-29} https://json-stat.org/format/#time]
× aJsonsunt: [array]
× bRequired: fale
× nSince: 1.0
× sParent: role
× sChild: none
name::
* McsEngl.Jnsttime,
* McsEngl.Jnstname.time!⇒Jnsttime,
* McsEngl.Jnst'time!⇒Jnsttime,
description::
"It can be used to assign a metric role to one or more dimensions. It takes the form of an array of dimension-IDs in which order does not have a special meaning.
"role": {
"metric": ["concept"]
}"
[{2020-12-29} https://json-stat.org/format/#metric]
× aJsonsunt: [array]
× bRequired: false
× nSince: 1.0
× sParent: role
× sChild: none
name::
* McsEngl.Jnstmetric,
* McsEngl.Jnstname.metric!⇒Jnstmetric,
* McsEngl.Jnst'metric!⇒Jnstmetric,
description::
"It contains metadata at the observation level. When it takes an array form of the same size of value, it assigns a status to each data by position.
{
"version" : "2.0",
"class" : "dataset",
"value" : [100, null, 102, 103, 104],
"status" : ["a", "m", "a", "a", "p"],
…
}
To assign the same status to all data, an array of size 1 can be used.
{
"version" : "2.0",
"class" : "dataset",
"value" : [100, 99, 102, 103, 104],
"status" : ["e"],
…
}
For the same purpose, a string can be used (this is the recommended way to assign the same status to all data).
{
"version" : "2.0",
"class" : "dataset",
"value" : [100, 99, 102, 103, 104],
"status" : "e",
…
}
An object can also be used to provide status information for specific cells.
{
"version" : "2.0",
"class" : "dataset",
"value" : [100, null, 102, 103, 104],
"status" : { "1" : "m" },
…
}
Currently, “status” does not have a standard meaning nor a standard vocabulary. These are, for the moment, up to the provider. It can be used to optionally include any metadata information at the observation level, not only what is regularly known as “status”. If the vocubulary does not adhere to a standard, there is no way yet to assign meaning to the status codes in the same response."
[{2020-12-29} https://json-stat.org/format/#status]
× aJsonsunt: [array, object, string]
× bRequired: false
× nSince: 1.0
× sParent: root (when class "dataset"), relation-ID array element
× sChild: none
name::
* McsEngl.Jnststatus,
* McsEngl.Jnstname.status!⇒Jnststatus,
* McsEngl.Jnst'status!⇒Jnststatus,
description::
"It describes the media type of the accompanying href. Not required when the resource referenced in the link is a JSON-stat resource."
[{2020-12-29} https://json-stat.org/format/#type]
× aJsonsunt: [string]
× bRequired: false
× nSince: 1.1
× sParent: relation-ID array element
× sChild: none
name::
* McsEngl.Jnsttype,
* McsEngl.Jnstname.type!⇒Jnsttype,
* McsEngl.Jnst'type!⇒Jnsttype,
description::
"extension allows JSON-stat to be extended for particular needs. Providers are free to define where they include this property and what children are allowed in each case."
[{2020-12-29} https://json-stat.org/format/#extension]
× aJsonsunt: [object]
× bRequired: false
× nSince: 1.1
× sParent: root, dimension-ID, relation-ID array element
× sChild: open
name::
* McsEngl.Jnstextension,
* McsEngl.Jnstname.extension!⇒Jnstextension,
* McsEngl.Jnst'extension!⇒Jnstextension,
description::
* https://json-stat.org/format/schema/2.0/,
* https://json-stat.org/format/schema/2.0/dataset.json,
* https://json-stat.org/format/schema/2.0/collection.json,
* https://json-stat.org/format/schema/2.0/dimension.json,
description::
· any program that manages Jnst-docs.
name::
* McsEngl.Jnst'tool!⇒Jnsttool,
* McsEngl.Jnsttool,
addressWpg::
* https://json-stat.org/tools/,
specific-tree-of-Jnsttool::
* validator,
* viewer,
description::
* https://json-stat.org/format/validator/,
name::
* McsEngl.Jnst'tool.validator,
* McsEngl.Jnst'validator,
description::
· Who is already using JSON-stat?
* Statistics Norway,
* UK’s Office for National Statistics,
* Statistics Sweden,
* Statistics Denmark,
* Statistics Greenland,
* Statistics Finland,
* Instituto Galego de Estatística,
* Central Statistics Office of Ireland,
* United Nations Economic Commission for Europe,
* Eurostat, Statistics Iceland,
* Statistics Faroe Islands,
* Statistics and Research Åland,
* Swedish Board of Agriculture,
* Statistical Institute of the Balearic Islands,
* Swiss Federal Statistical Office,
* Croatian Bureau of Statistics,
* Central Statistical Bureau of Latvia,
* Statistical Committee of the Republic of Armenia,
* State Statistical Office of the Republic of Macedonia,
* Basque Institute of Statistics,
* Cantabrian Institute of Statistics,
* National Statistical Institute of Spain,
* National Statistical Institute of Bulgaria,
* Republic of Slovenia Statistical Office,
* Bank of Portugal,
* Finnish Institute for Health and Welfare,
[{2020-12-29} https://json-stat.org/]
description::
* introduction: https://www.slideshare.net/badosa/json-stat,
* https://json-stat.org/,
* http://json-schema.org/,
* https://github.com/jsonstat/csv,
* https://xavierbadosa.com/,
* https://www.slideshare.net/badosa/jsonstat-in-the-sea-of-standards,
This page was-visited times since {2017-11-03}
page-wholepath: synagonism.net / worldviewSngo / dirTechInfo / lagJson
SEARCH::
This page uses 'locator-names', names that when you find them, you find the-LOCATION of the-concept they denote.
• LOCAL-SEARCH:
Type CTRL+F "McsLag4.words-of-concept's-name", to go to the-LOCATION of the-concept.
• GLOBAL-SEARCH:
Clicking on the-GREEN-BAR of a-page you have access to the-global--locator-names of my-site.
A-preview of the-description of a-global-name makes reading fast.
Abbreviations have no description.
Webpage-Versions::
• version.last.dynamic: McsTchInf000029.last.html,
• version.2-0-0.2021-04-10: (1-11) ../../dirMiwMcs/dirTchInf/filMcsLagJson.2-0-0.2021-04-10.html,
• version.1-0-0.2017-11-26.last ../../dirMiwMcs/dirTchInf/FilMcsJson.1-0-0.2017-11-26.html,
• version.0-1-0.2017-11-03.created: ../../dirMiwMcs/dirTchInf/filMcsJSON.0-1-0.2017-11-03.html,