Skip to content
Sean Leary edited this page Dec 9, 2018 · 13 revisions

Welcome to the JSON-java wiki! A reference application to demonstrate parsing JSON in Java

Introduction

JSON-Java is a reference application for reading and writing JSON docs in Java. It was written by Douglas Crockford, who first specified the JSON document format. It works by parsing and storing JSON text inside of POJOs - Plain Old Java Objects. This allows your Java code to navigate into the doc, read, update, and write the JSON document.

Getting Started

These are the primary classes, which you will interact with the most:

  • JSONObject: Stores JSON objects, which are enclosed in curly braces. A simple JSON object looks something like this:

    { "hello" : "world" }

The easiest way to convert

  • JSONArray: Stores JSON arrays, which are enclosed in square brackets. A simple JSON array looks something like this:

    [ "hello", "world" ]

Basic Operations

Additional Capabilities