# Chapter 2. JSON

## Introduction

The web application code for libzeep contained an implementation of expression language, a simple language used in the HTML templates. The variables in this language look and act a bit like objects in JavaScript. And then REST support was added and more support for JSON was needed.

For C++ there is already a very good JSON library available from Niels Lohmann. I tried to use this initially, but it didn't fit well into the rest of libzeep. Still I liked the way it worked and so I tried to create something that is source code compatible, however fancy stuff like JSON Pointer and JSON Patch are not available (yet).

This library just provides code to parse and write JSON. It stores the data in an efficient way, allows easy manipulation and also can use the same mechanism of serialization as the XML library.