Skip to content

NavInfoNC/json-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JsonScript

JsonScript(JSS) is a markup language to describe the structure of JSON data.

Together with Sphinx-Docs, JSS provides an easy-and-powerful way to document the structure of JSON data. It has been widely used in our department to document online service for many years.

A Simple Example

To document a JSON file:

{
   "dataVersion" : "NaviInfo.2019.03",
   "routeLength" : 1300.0,
   "eta" : 240
}

We can use a JSS:

/* The brief of a route */
RouteBrief =
{
   dataVersion : "NaviInfo.2019.03",   // the version of the map data
   routeLength : 1300.0,  // The length of the route, in meters
   eta : int  // Estimated Time of Arrival, in seconds.
}

As you can see, literal values are often used instead of types(string, int, float). And it allows adding C++ style comments.

In This Project

This project contains:

Notes

JSS's inspired by DataScript, which is used to describe binary data.

There are other alternatives, like JSON Schema.

About

A descriptive language to describe JSON data. It's very useful to write format specification.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published