GDAL

Classes | Functions
cpl_json.h File Reference

Interface for read and write JSON documents. More...

`#include "cpl_progress.h"`
`#include "cpl_string.h"`
`#include <cstdint>`
`#include <string>`
`#include <vector>`

Go to the source code of this file.

## Classes
class | CPLJSONObject
| The CPLJSONArray class holds JSON object from CPLJSONDocument. More...
class | CPLJSONArray
| The JSONArray class JSON array from JSONDocument. More...
class | CPLJSONDocument
| The CPLJSONDocument class Wrapper class around json-c library. More...

## Functions
CPLStringList | CPLParseKeyValueJson (const char *pszJson)
| Return a string list of key/value pairs extracted from a JSON doc. More...

## Detailed Description

Interface for read and write JSON documents.

## Function Documentation

## ◆ CPLParseKeyValueJson()

CPLStringList CPLParseKeyValueJson | ( | const char * | pszJson | ) |

Return a string list of key/value pairs extracted from a JSON doc.

We are expecting simple documents with key:value pairs, like the following with no hierarchy or complex structure.

    {
      "Code" : "Success",
      "LastUpdated" : "2017-07-03T16:20:17Z",
      "Type" : "AWS-HMAC",
      "AccessKeyId" : "bla",
      "SecretAccessKey" : "bla",
      "Token" : "bla",
      "Expiration" : "2017-07-03T22:42:58Z"
    }

Since
  GDAL 3.7