Giter VIP home page Giter VIP logo

json-examples's Introduction

json-examples

Examples of JSON parsing / generation and http requests in various languages

Solutions Explored

  1. jQuery (in Browser, all the hard stuff is handled)
  2. NodeJS (Best HTTP and JSON support)
  3. Ruby
  4. Python
  5. GoLang
  6. luvit (lua)
  7. C#
  8. Java
  9. curl (exec from any language)
  10. bash
  11. C

ProTip: Use an Application Language (NodeJS, Python, Ruby) to do all of your HTTP / JSON work coupled with some sort of message passing (such as packing a struct) if you need to use a Systems Language (C, Java, C#). Or just do it all in Go. That would be the best language.

IMPORTANT

The parser you choose MUST be configureable meet the following criteria:

  • IGNORE unexpected and unused fields (new fields may be added at any time)
  • ACCEPT null as a non-value for any field type

Additionally:

  • when a number is encountered where a string was expected, the number should be treated as a string
  • if an expected field does not exist, it should be treated the same as if the value were null

Examples

The eventual goal is to have examples for all of the following in each language:

  • HTTP GET request
  • HTTP POST request
  • JSON parsing (decoding / deserializing)
  • Iterating over objects and arrays
  • JSON stringifying (encoding / serializing)

json-examples's People

Contributors

beatgammit avatar ericpeterson avatar jergason avatar

Watchers

James Cloos avatar

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.