Code Monkey home page Code Monkey logo

agrojson's Introduction

agroJSON - A JSON schema for agriculture

agroJSON is a JSON schema designed to simplify client-server communication along the agricultural production and supply chain. It closely follows the specifications made by agroXML, however introduces some simplifications geared towards (client side) web use.

Why not use agroXML?

XML and JSON both have their benefits. However, XML shines with features like attributes, namespacing, and well established schema validation. This makes it especially suitable for the heterogenous requirements present in the agricultural production and supply chain. In server-to-server, Java and many other environments, agroXML should therefore remain the preferred way of communication.

With the establishment and uptake of modern web frameworks such as Angular, React and Vue, feature-rich client applications are becoming more and more popular. In most cases, these client applications directly leverage RESTful API's in order to provide content to their users. Since these client applications are largely written in JavaScript, and JSON (JavaScript Object Notation) being natively supported to be parsed by JavaScript, using JSON has become a de-facto standard for exchanging data between web services and clients. agroJSON aims to be a drop-in replacement for agroXML in client-server scenarios where JSON would be preferred over XML.

Differences to agroXML

In agroXML, spatial data is written in a subset (profile) of Geography Markup Language (GML), being an XML grammar. As agroJSON builds on the JSON format, GeoJSON is used to describe spatial data instead. An advantage of using GeoJSON as the default spatial data format is that all of the popular JavaScript mapping libraries, e.g. Leaflet, Mapbox, OpenLayers, as well as Google Maps, support GeoJSON out of the box. In order to maximize compatibility with these mapping services, coordinates are represented using the Web Mercator Projection (WGS 84, EPSG:3857) instead of the ETRS89/EPSG:25832 projection commonly used in Europe.

Contribution

Contribution is highly appreciated!

Current ToDo's involve the following

  • Get example agroXML files for the different modules described on the official website: http://195.37.233.20/documentation/agroxml.html
  • Further cleanup of the JSON schema (due to automatic conversion from the agroXML XSDs)
  • Conversion tool between agroXML <-> agroJSON

If you are interested in helping out, please open an issue, pull request or drop a mail at [email protected]!

Make sure to npm test before creating a pull request.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.