# Jodd JSON

JavaScript Object Notation (aka [JSON](http://json.org/)) is a very popular lightweight data-interchange format. **Jodd JSON** is a lightweight library for (de)serializing Java objects into and from JSON.

Before you say: "Yet another one?", please check what makes **Jodd JSON** unique. The power of the library is its control over the process of serialization and parsing; ease of use and great performances.

### Quick Start <a href="#quick-start" id="quick-start"></a>

Let's see how to serialize:

```java
Book book = new Book();
book.setName("Jodd in Action);
book.setYear(2018);
book.setAuthors(List.of(new Author("Igor")));

String json = JsonSerializer.create()
        .include("authors")
        .serialize(book);
```

The resulting JSON may look like this:

```javascript
{
    "name" : "Jodd In Action",
    "year" : 2018,
    "authors" : [
        { "firstName" : "Igor" }
    ]
}
```

Parse the JSON back to Java:

```java
Book book2 = new JsonParser()
        .parse(json, Book.class);
```

Pretty simple, right? But don't get blinded by the simplicity, **Jodd JSON** is pretty powerful. Did I mention it is one of the fastest JSON frameworks out there?

### Main features

* simple syntax and fluent interface,
* lazy parser that is super fast,
* annotations for better conversion control,
* convenient `JSONObject` and `JSONArray` classes,
* powerful exclusion and inclusion rules,
* serializer definition for types,
* the only library that can handle any number size,
* pretty formatting of the JSON output,
* loose, more forgiving, parsing mode,
* ways to address the keys and values of the Maps
* flexible fine-tuning,
* and more…

### License

The code is released under the `BSD-2-Clause` license. It has a minimal set of dependencies with the same or similarly open license, so you should be able to use it in any project and for any purpose.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://json.jodd.org/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
