Couchbase Lite C
Couchbase Lite C API
Loading...
Searching...
No Matches
FLJSON.h File Reference
#include "FLBase.h"

Go to the source code of this file.

Macros

#define _FLJSON_H

Functions

Converting to JSON

These are convenience functions that directly return a JSON representation of a value.

For more control over the encoding, use an Fleece Encoders with format kFLEncodeJSON.

FLEECE_PUBLIC FLStringResult FLValue_ToJSON (FLValue FL_NULLABLE)
 Encodes a Fleece value as JSON (or a JSON fragment.)
FLEECE_PUBLIC FLStringResult FLValue_ToJSON5 (FLValue FL_NULLABLE)
 Encodes a Fleece value as JSON5, a more lenient variant of JSON that allows dictionary keys to be unquoted if they're alphanumeric.
FLEECE_PUBLIC FLStringResult FLValue_ToJSONX (FLValue FL_NULLABLE v, bool json5, bool canonicalForm)
 Most general Fleece to JSON converter.
Parsing JSON to Fleece Values
NODISCARD FLEECE_PUBLIC FLDoc FLDoc_FromJSON (FLSlice json, FLError *FL_NULLABLE outError)
 Creates an FLDoc from JSON-encoded data.
NODISCARD FLEECE_PUBLIC FLMutableArray FL_NULLABLE FLMutableArray_NewFromJSON (FLString json, FLError *FL_NULLABLE outError)
 Creates a new mutable Array from JSON.
NODISCARD FLEECE_PUBLIC FLMutableDict FL_NULLABLE FLMutableDict_NewFromJSON (FLString json, FLError *FL_NULLABLE outError)
 Creates a new mutable Dict from json.
FLEECE_PUBLIC bool FLEncoder_ConvertJSON (FLEncoder, FLSlice json)
 Parses JSON data and writes the value(s) to the encoder as their Fleece equivalents.

Macro Definition Documentation

◆ _FLJSON_H

#define _FLJSON_H