62 bool uniqueStrings)
FLAPI;
#define FL_NULLABLE
Definition: CompilerSupport.h:74
#define FLEECE_PUBLIC
Definition: CompilerSupport.h:241
#define FL_ASSUME_NONNULL_BEGIN
Definition: CompilerSupport.h:72
#define FL_ASSUME_NONNULL_END
Definition: CompilerSupport.h:73
#define FLAPI
Definition: CompilerSupport.h:247
#define MUST_USE_RESULT
Definition: CompilerSupport.h:53
FLEECE_PUBLIC FLEncoder FLEncoder_NewWritingToFile(FILE *, bool uniqueStrings)
Creates a new Fleece encoder that writes to a file, not to memory.
FLEECE_PUBLIC bool FLEncoder_WriteInt(FLEncoder, int64_t)
Writes an integer to an encoder.
FLEECE_PUBLIC bool FLEncoder_EndDict(FLEncoder)
Ends writing a dictionary value; pops back the previous encoding state.
FLEECE_PUBLIC const char *FL_NULLABLE FLEncoder_GetErrorMessage(FLEncoder)
Returns the error message of an encoder, or NULL if there's no error.
FLEECE_PUBLIC bool FLEncoder_BeginArray(FLEncoder, size_t reserveCount)
Begins writing an array value to an encoder.
FLEECE_PUBLIC bool FLEncoder_WriteKeyValue(FLEncoder, FLValue)
Specifies the key for the next value to be written to the current dictionary.
FLEECE_PUBLIC bool FLEncoder_WriteFloat(FLEncoder, float)
Writes a 32-bit floating point number to an encoder.
FLEECE_PUBLIC FLError FLEncoder_GetError(FLEncoder)
Returns the error code of an encoder, or NoError (0) if there's no error.
FLEECE_PUBLIC bool FLEncoder_WriteDateString(FLEncoder encoder, FLTimestamp ts, bool asUTC)
Writes a timestamp to an encoder, as an ISO-8601 date string.
MUST_USE_RESULT FLEECE_PUBLIC FLDoc FL_NULLABLE FLEncoder_FinishDoc(FLEncoder, FLError *FL_NULLABLE outError)
Ends encoding; if there has been no error, it returns the encoded Fleece data packaged in an FLDoc.
FLEECE_PUBLIC void FLEncoder_SetSharedKeys(FLEncoder, FLSharedKeys FL_NULLABLE)
Tells the encoder to use a shared-keys mapping when encoding dictionary keys.
FLEECE_PUBLIC void * FLEncoder_GetExtraInfo(FLEncoder)
Returns the user-defined value associated with the encoder; NULL by default.
FLEECE_PUBLIC bool FLEncoder_WriteBool(FLEncoder, bool)
Writes a boolean value (true or false) to an encoder.
FLEECE_PUBLIC bool FLEncoder_WriteString(FLEncoder, FLString)
Writes a string to an encoder.
FLEECE_PUBLIC bool FLEncoder_WriteKey(FLEncoder, FLString)
Specifies the key for the next value to be written to the current dictionary.
FLEECE_PUBLIC bool FLEncoder_WriteUndefined(FLEncoder)
Writes an undefined value to an encoder.
FLEECE_PUBLIC size_t FLEncoder_BytesWritten(FLEncoder)
Returns the number of bytes encoded so far.
FLEECE_PUBLIC void FLEncoder_Free(FLEncoder FL_NULLABLE)
Frees the space used by an encoder.
FLEECE_PUBLIC void FLEncoder_Reset(FLEncoder)
Resets the state of an encoder without freeing it.
FLEncoderFormat
Output formats a FLEncoder can generate.
Definition: FLEncoder.h:43
FLEECE_PUBLIC bool FLEncoder_EndArray(FLEncoder)
Ends writing an array value; pops back the previous encoding state.
FLEECE_PUBLIC bool FLEncoder_WriteData(FLEncoder, FLSlice)
Writes a binary data value (a blob) to an encoder.
FLEECE_PUBLIC void FLEncoder_SetExtraInfo(FLEncoder, void *FL_NULLABLE info)
Associates an arbitrary user-defined value with the encoder.
MUST_USE_RESULT FLEECE_PUBLIC FLSliceResult FLEncoder_Finish(FLEncoder, FLError *FL_NULLABLE outError)
Ends encoding; if there has been no error, it returns the encoded data, else null.
FLEECE_PUBLIC bool FLEncoder_WriteNull(FLEncoder)
Writes a null value to an encoder.
FLEECE_PUBLIC bool FLEncoder_BeginDict(FLEncoder, size_t reserveCount)
Begins writing a dictionary value to an encoder.
FLEECE_PUBLIC FLEncoder FLEncoder_New(void)
Creates a new encoder, for generating Fleece data.
FLEECE_PUBLIC bool FLEncoder_WriteUInt(FLEncoder, uint64_t)
Writes an unsigned integer to an encoder.
FLEECE_PUBLIC bool FLEncoder_WriteValue(FLEncoder, FLValue)
Writes a Fleece Value to an Encoder.
FLEECE_PUBLIC FLEncoder FLEncoder_NewWithOptions(FLEncoderFormat format, size_t reserveSize, bool uniqueStrings)
Creates a new encoder, allowing some options to be customized.
FLEECE_PUBLIC bool FLEncoder_WriteRaw(FLEncoder, FLSlice)
Writes raw data directly to the encoded output.
FLEECE_PUBLIC bool FLEncoder_WriteDouble(FLEncoder, double)
Writes a 64-bit floating point number to an encoder.
@ kFLEncodeFleece
Fleece encoding.
Definition: FLEncoder.h:44
@ kFLEncodeJSON5
JSON5, an extension of JSON with a more readable syntax
Definition: FLEncoder.h:46
@ kFLEncodeJSON
JSON encoding.
Definition: FLEncoder.h:45
int64_t FLTimestamp
A point in time, expressed as milliseconds since the Unix epoch (1-1-1970 midnight UTC....
Definition: FLBase.h:92
FLError
Error codes returned from some API calls.
Definition: FLBase.h:48
struct _FLDoc * FLDoc
A reference to a document.
Definition: FLBase.h:42
struct _FLEncoder * FLEncoder
A reference to an encoder.
Definition: FLBase.h:41
struct _FLSharedKeys * FLSharedKeys
A reference to a shared-keys mapping.
Definition: FLBase.h:43
const struct _FLValue * FLValue
A reference to a value of any type.
Definition: FLBase.h:35
A simple reference to a block of memory.
Definition: FLSlice.h:45
A heap-allocated block of memory returned from an API call.
Definition: FLSlice.h:63