---
product: Chilkat
product_version: 11.7.0
language: wc
language_label: Unicode C
class: JsonObject
license: free
deprecated: false
reference_html: https://www.chilkatsoft.com/refdoc/wc_CkJsonObjectWRef.html
---
# Chilkat JsonObject — Unicode C — v11.7.0

> Chilkat 11.7.0 · language=wc · class=JsonObject
> Other versions: replace `11.7.0` in this URL. Other languages: `https://www.chilkatsoft.com/ai-docs/v/11.7.0/<lang>/classes/JsonObject.md`.
> Language-wide rules (install, unlock, error model, strings/bytes): `https://www.chilkatsoft.com/ai-docs/v/11.7.0/wc/guide.md`.

## Purpose

**Load, navigate, create, modify, search, sort, and emit JSON objects.**

`Chilkat.JsonObject` provides DOM-style access to JSON objects. It can load, inspect, modify, create, search, sort, emit, and save JSON data. It supports path-based access, index-based member access, automatic creation of nested paths, object and array references, Firebase-style updates, record searches, date/time conversion, binary data encoding, variable substitution, and optional secure secret resolution.

**Load and emit JSON**

Load JSON from strings, files, buffers, or Chilkat objects, then emit the result as compact or pretty-formatted JSON.

**Path-based navigation**

Read and update nested values using JSON paths, with support for automatically creating missing object or array paths.

**Member access**

Access object members by name or index, inspect member types, retrieve values, and remove or rename members as needed.

**Nested objects and arrays**

Work directly with child `JsonObject` and `JsonArray` references to navigate and modify complex JSON structures.

**Search and transform**

Search records, sort object members, perform Firebase-style updates, and prepare JSON for API requests or application storage.

**Special value handling**

Handle date/time values, binary data encodings, exact numeric text, variable substitution, and secure secret resolution.

**Common pattern:** Load or create a `JsonObject`, navigate named members and nested paths, retrieve child arrays as `JsonArray` objects when ordered lists are encountered, update values as needed, then emit or save the final JSON. Use `JsonObject` for named JSON members and `JsonArray` for ordered lists.

For an extended overview, see [JsonObject Class Overview](https://www.chilkatsoft.com/jsonobject_class_overview.asp).

## Object creation, unlocking and error handling

**Create/Dispose**

```c
HCkJsonObjectW instance = CkJsonObjectW_Create();
// ...
CkJsonObjectW_Dispose(instance);
```

`HCkJsonObjectW CkJsonObjectW_Create(void);`

Creates an instance of the HCkJsonObjectW object and returns a handle ("void \*" pointer). The handle is passed in the 1st argument for the functions listed on this page.

`void CkJsonObjectW_Dispose(HCkJsonObjectW handle);`

Objects created by calling CkJsonObjectW_Create must be freed by calling this method. A memory leak occurs if a handle is not disposed by calling this function. Also, any handle returned by a Chilkat "C" function must also be freed by the application by calling the appropriate Dispose method, such as CkJsonObjectW_Dispose.

Call `Global.UnlockBundle` once at the start of the program, before using this or any other Chilkat class. Any string unlocks a fully functional 30-day trial; a purchased unlock code is used in production. See `guide.md` for the exact code in Unicode C.

## Members common to every Chilkat class

Documented once per language in `common-members.md`; listed here so this page is self-contained.

| Property | Signature | Access | Meaning |
|---|---|---|---|
| `DebugLogFilePath` | `void CkJsonObjectW_getDebugLogFilePath(HCkJsonObjectW cHandle, HCkString retval); void CkJsonObjectW_putDebugLogFilePath(HCkJsonObjectW cHandle, const wchar_t *newVal); const wchar_t *CkJsonObjectW_debugLogFilePath(HCkJsonObjectW cHandle);` | read/write | If set to a file path, this property logs the LastErrorText of each Chilkat method or property call to the specified file. |
| `LastErrorHtml` | `void CkJsonObjectW_getLastErrorHtml(HCkJsonObjectW cHandle, HCkString retval); const wchar_t *CkJsonObjectW_lastErrorHtml(HCkJsonObjectW cHandle);` | read-only | Provides HTML-formatted information about the last called method or property. |
| `LastErrorText` | `void CkJsonObjectW_getLastErrorText(HCkJsonObjectW cHandle, HCkString retval); const wchar_t *CkJsonObjectW_lastErrorText(HCkJsonObjectW cHandle);` | read-only | Provides plain text information about the last called method or property. |
| `LastErrorXml` | `void CkJsonObjectW_getLastErrorXml(HCkJsonObjectW cHandle, HCkString retval); const wchar_t *CkJsonObjectW_lastErrorXml(HCkJsonObjectW cHandle);` | read-only | Provides XML-formatted information about the last called method or property. |
| `LastMethodSuccess` | `BOOL CkJsonObjectW_getLastMethodSuccess(HCkJsonObjectW cHandle); void CkJsonObjectW_putLastMethodSuccess(HCkJsonObjectW cHandle, BOOL newVal);` | read/write | Indicates the success or failure of the most recent method call: `TRUE` means success, `FALSE` means failure. |
| `VerboseLogging` | `BOOL CkJsonObjectW_getVerboseLogging(HCkJsonObjectW cHandle); void CkJsonObjectW_putVerboseLogging(HCkJsonObjectW cHandle, BOOL newVal);` | read/write | If set to `TRUE`, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. |
| `Version` | `void CkJsonObjectW_getVersion(HCkJsonObjectW cHandle, HCkString retval); const wchar_t *CkJsonObjectW_version(HCkJsonObjectW cHandle);` | read-only | Version of the component/library, such as "10.1.0" |

## Member index

| Member | Kind | Signature |
|---|---|---|
| `DelimiterChar` | property, read/write | `void CkJsonObjectW_getDelimiterChar(HCkJsonObjectW cHandle, HCkString retval); void CkJsonObjectW_putDelimiterChar(HCkJsonObjectW cHandle, const wchar_t *newVal); const wchar_t *CkJsonObjectW_delimiterChar(HCkJsonObjectW cHandle);` |
| `EmitCompact` | property, read/write | `BOOL CkJsonObjectW_getEmitCompact(HCkJsonObjectW cHandle); void CkJsonObjectW_putEmitCompact(HCkJsonObjectW cHandle, BOOL newVal);` |
| `EmitCrLf` | property, read/write | `BOOL CkJsonObjectW_getEmitCrLf(HCkJsonObjectW cHandle); void CkJsonObjectW_putEmitCrLf(HCkJsonObjectW cHandle, BOOL newVal);` |
| `EnableSecrets` | property, read/write | `BOOL CkJsonObjectW_getEnableSecrets(HCkJsonObjectW cHandle); void CkJsonObjectW_putEnableSecrets(HCkJsonObjectW cHandle, BOOL newVal);` |
| `I` | property, read/write | `int CkJsonObjectW_getI(HCkJsonObjectW cHandle); void CkJsonObjectW_putI(HCkJsonObjectW cHandle, int newVal);` |
| `J` | property, read/write | `int CkJsonObjectW_getJ(HCkJsonObjectW cHandle); void CkJsonObjectW_putJ(HCkJsonObjectW cHandle, int newVal);` |
| `K` | property, read/write | `int CkJsonObjectW_getK(HCkJsonObjectW cHandle); void CkJsonObjectW_putK(HCkJsonObjectW cHandle, int newVal);` |
| `LowerCaseNames` | property, read/write | `BOOL CkJsonObjectW_getLowerCaseNames(HCkJsonObjectW cHandle); void CkJsonObjectW_putLowerCaseNames(HCkJsonObjectW cHandle, BOOL newVal);` |
| `PathPrefix` | property, read/write | `void CkJsonObjectW_getPathPrefix(HCkJsonObjectW cHandle, HCkString retval); void CkJsonObjectW_putPathPrefix(HCkJsonObjectW cHandle, const wchar_t *newVal); const wchar_t *CkJsonObjectW_pathPrefix(HCkJsonObjectW cHandle);` |
| `Size` | property, read-only | `int CkJsonObjectW_getSize(HCkJsonObjectW cHandle);` |
| `Strict` | property, read/write | `BOOL CkJsonObjectW_getStrict(HCkJsonObjectW cHandle); void CkJsonObjectW_putStrict(HCkJsonObjectW cHandle, BOOL newVal);` |
| `UncommonOptions` | property, read/write | `void CkJsonObjectW_getUncommonOptions(HCkJsonObjectW cHandle, HCkString retval); void CkJsonObjectW_putUncommonOptions(HCkJsonObjectW cHandle, const wchar_t *newVal); const wchar_t *CkJsonObjectW_uncommonOptions(HCkJsonObjectW cHandle);` |
| `AddArrayAt` | method | `BOOL CkJsonObjectW_AddArrayAt(HCkJsonObjectW cHandle, int index, const wchar_t *name);` |
| `AddArrayCopyAt` | method | `BOOL CkJsonObjectW_AddArrayCopyAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, HCkJsonArrayW jarr);` |
| `AddBoolAt` | method | `BOOL CkJsonObjectW_AddBoolAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, BOOL value);` |
| `AddIntAt` | method | `BOOL CkJsonObjectW_AddIntAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, int value);` |
| `AddNullAt` | method | `BOOL CkJsonObjectW_AddNullAt(HCkJsonObjectW cHandle, int index, const wchar_t *name);` |
| `AddNumberAt` | method | `BOOL CkJsonObjectW_AddNumberAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, const wchar_t *numericStr);` |
| `AddObjectAt` | method | `BOOL CkJsonObjectW_AddObjectAt(HCkJsonObjectW cHandle, int index, const wchar_t *name);` |
| `AddObjectCopyAt` | method | `BOOL CkJsonObjectW_AddObjectCopyAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, HCkJsonObjectW jsonObj);` |
| `AddStringAt` | method | `BOOL CkJsonObjectW_AddStringAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, const wchar_t *value);` |
| `AppendArray` | method | `HCkJsonArrayW CkJsonObjectW_AppendArray(HCkJsonObjectW cHandle, const wchar_t *name);` |
| `AppendArray2` | method | `BOOL CkJsonObjectW_AppendArray2(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonArrayW jarr);` |
| `AppendArrayCopy` | method | `BOOL CkJsonObjectW_AppendArrayCopy(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonArrayW jarr);` |
| `AppendBool` | method | `BOOL CkJsonObjectW_AppendBool(HCkJsonObjectW cHandle, const wchar_t *name, BOOL value);` |
| `AppendInt` | method | `BOOL CkJsonObjectW_AppendInt(HCkJsonObjectW cHandle, const wchar_t *name, int value);` |
| `AppendObject` | method | `HCkJsonObjectW CkJsonObjectW_AppendObject(HCkJsonObjectW cHandle, const wchar_t *name);` |
| `AppendObject2` | method | `BOOL CkJsonObjectW_AppendObject2(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonObjectW jsonObj);` |
| `AppendObjectCopy` | method | `BOOL CkJsonObjectW_AppendObjectCopy(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonObjectW jsonObj);` |
| `AppendString` | method | `BOOL CkJsonObjectW_AppendString(HCkJsonObjectW cHandle, const wchar_t *name, const wchar_t *value);` |
| `AppendStringArray` | method | `BOOL CkJsonObjectW_AppendStringArray(HCkJsonObjectW cHandle, const wchar_t *name, HCkStringTableW values);` |
| `ArrayAt` | method | `HCkJsonArrayW CkJsonObjectW_ArrayAt(HCkJsonObjectW cHandle, int index);` |
| `ArrayAt2` | method | `BOOL CkJsonObjectW_ArrayAt2(HCkJsonObjectW cHandle, int index, HCkJsonArrayW jarr);` |
| `ArrayOf` | method | `HCkJsonArrayW CkJsonObjectW_ArrayOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `ArrayOf2` | method | `BOOL CkJsonObjectW_ArrayOf2(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkJsonArrayW jarr);` |
| `BoolAt` | method | `BOOL CkJsonObjectW_BoolAt(HCkJsonObjectW cHandle, int index);` |
| `BoolOf` | method | `BOOL CkJsonObjectW_BoolOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `BytesOf` | method | `BOOL CkJsonObjectW_BytesOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *encoding, HCkBinDataW bd);` |
| `Clear` | method | `void CkJsonObjectW_Clear(HCkJsonObjectW cHandle);` |
| `CopyRef` | method | `BOOL CkJsonObjectW_CopyRef(HCkJsonObjectW cHandle, HCkJsonObjectW jsonObj);` |
| `DateOf` | method | `BOOL CkJsonObjectW_DateOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkDateTimeW dt);` |
| `Delete` | method | `BOOL CkJsonObjectW_Delete(HCkJsonObjectW cHandle, const wchar_t *name);` |
| `DeleteAt` | method | `BOOL CkJsonObjectW_DeleteAt(HCkJsonObjectW cHandle, int index);` |
| `DeleteRecords` | method | `int CkJsonObjectW_DeleteRecords(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relpath, const wchar_t *value, BOOL caseSensitive);` |
| `DtOf` | method | `BOOL CkJsonObjectW_DtOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, BOOL bLocal, HCkDtObjW dt);` |
| `Emit` | method | `BOOL CkJsonObjectW_Emit(HCkJsonObjectW cHandle, const wchar_t *outStr); const wchar_t *CkJsonObjectW_emit(HCkJsonObjectW cHandle);` |
| `EmitBd` | method | `BOOL CkJsonObjectW_EmitBd(HCkJsonObjectW cHandle, HCkBinDataW bd);` |
| `EmitSb` | method | `BOOL CkJsonObjectW_EmitSb(HCkJsonObjectW cHandle, HCkStringBuilderW sb);` |
| `EmitWithSubs` | method | `BOOL CkJsonObjectW_EmitWithSubs(HCkJsonObjectW cHandle, HCkHashtableW subs, BOOL omitEmpty, const wchar_t *outStr); const wchar_t *CkJsonObjectW_emitWithSubs(HCkJsonObjectW cHandle, HCkHashtableW subs, BOOL omitEmpty);` |
| `FindObjectWithMember` | method | `HCkJsonObjectW CkJsonObjectW_FindObjectWithMember(HCkJsonObjectW cHandle, const wchar_t *name);` |
| `FindObjectWithMember2` | method | `BOOL CkJsonObjectW_FindObjectWithMember2(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonObjectW jsonObj);` |
| `FindRecord` | method | `HCkJsonObjectW CkJsonObjectW_FindRecord(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relPath, const wchar_t *value, BOOL caseSensitive);` |
| `FindRecord2` | method | `BOOL CkJsonObjectW_FindRecord2(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relPath, const wchar_t *value, BOOL caseSensitive, HCkJsonObjectW jsonObj);` |
| `FindRecordString` | method | `BOOL CkJsonObjectW_FindRecordString(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relPath, const wchar_t *value, BOOL caseSensitive, const wchar_t *retRelPath, const wchar_t *outStr); const wchar_t *CkJsonObjectW_findRecordString(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relPath, const wchar_t *value, BOOL caseSensitive, const wchar_t *retRelPath);` |
| `FirebaseApplyEvent` | method | `BOOL CkJsonObjectW_FirebaseApplyEvent(HCkJsonObjectW cHandle, const wchar_t *name, const wchar_t *data);` |
| `FirebasePatch` | method | `BOOL CkJsonObjectW_FirebasePatch(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *jsonData);` |
| `FirebasePut` | method | `BOOL CkJsonObjectW_FirebasePut(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value);` |
| `GetDocRoot` | method | `HCkJsonObjectW CkJsonObjectW_GetDocRoot(HCkJsonObjectW cHandle);` |
| `GetDocRoot2` | method | `BOOL CkJsonObjectW_GetDocRoot2(HCkJsonObjectW cHandle, HCkJsonObjectW docRoot);` |
| `HasMember` | method | `BOOL CkJsonObjectW_HasMember(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `IndexOf` | method | `int CkJsonObjectW_IndexOf(HCkJsonObjectW cHandle, const wchar_t *name);` |
| `IntAt` | method | `int CkJsonObjectW_IntAt(HCkJsonObjectW cHandle, int index);` |
| `IntOf` | method | `int CkJsonObjectW_IntOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `IsNullAt` | method | `BOOL CkJsonObjectW_IsNullAt(HCkJsonObjectW cHandle, int index);` |
| `IsNullOf` | method | `BOOL CkJsonObjectW_IsNullOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `JsonTypeOf` | method | `int CkJsonObjectW_JsonTypeOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `Load` | method | `BOOL CkJsonObjectW_Load(HCkJsonObjectW cHandle, const wchar_t *json);` |
| `LoadBd` | method | `BOOL CkJsonObjectW_LoadBd(HCkJsonObjectW cHandle, HCkBinDataW bd);` |
| `LoadFile` | method | `BOOL CkJsonObjectW_LoadFile(HCkJsonObjectW cHandle, const wchar_t *path);` |
| `LoadPredefined` | method | `BOOL CkJsonObjectW_LoadPredefined(HCkJsonObjectW cHandle, const wchar_t *name);` |
| `LoadSb` | method | `BOOL CkJsonObjectW_LoadSb(HCkJsonObjectW cHandle, HCkStringBuilderW sb);` |
| `MakeCopy` | method | `BOOL CkJsonObjectW_MakeCopy(HCkJsonObjectW cHandle, HCkJsonObjectW json);` |
| `MoveMember` | method | `BOOL CkJsonObjectW_MoveMember(HCkJsonObjectW cHandle, int fromIndex, int toIndex);` |
| `NameAt` | method | `BOOL CkJsonObjectW_NameAt(HCkJsonObjectW cHandle, int index, const wchar_t *outStr); const wchar_t *CkJsonObjectW_nameAt(HCkJsonObjectW cHandle, int index);` |
| `NewArrayOf` | method | `BOOL CkJsonObjectW_NewArrayOf(HCkJsonObjectW cHandle, const wchar_t *path, const wchar_t *jArr);` |
| `NewObjectOf` | method | `BOOL CkJsonObjectW_NewObjectOf(HCkJsonObjectW cHandle, const wchar_t *path, const wchar_t *jObj);` |
| `ObjectAt` | method | `HCkJsonObjectW CkJsonObjectW_ObjectAt(HCkJsonObjectW cHandle, int index);` |
| `ObjectAt2` | method | `BOOL CkJsonObjectW_ObjectAt2(HCkJsonObjectW cHandle, int index, HCkJsonObjectW jsonObj);` |
| `ObjectOf` | method | `HCkJsonObjectW CkJsonObjectW_ObjectOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `ObjectOf2` | method | `BOOL CkJsonObjectW_ObjectOf2(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkJsonObjectW jsonObj);` |
| `Predefine` | method | `BOOL CkJsonObjectW_Predefine(HCkJsonObjectW cHandle, const wchar_t *name);` |
| `Rename` | method | `BOOL CkJsonObjectW_Rename(HCkJsonObjectW cHandle, const wchar_t *oldName, const wchar_t *newName);` |
| `RenameAt` | method | `BOOL CkJsonObjectW_RenameAt(HCkJsonObjectW cHandle, int index, const wchar_t *name);` |
| `SetBoolAt` | method | `BOOL CkJsonObjectW_SetBoolAt(HCkJsonObjectW cHandle, int index, BOOL value);` |
| `SetBoolOf` | method | `BOOL CkJsonObjectW_SetBoolOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, BOOL value);` |
| `SetIntAt` | method | `BOOL CkJsonObjectW_SetIntAt(HCkJsonObjectW cHandle, int index, int value);` |
| `SetIntOf` | method | `BOOL CkJsonObjectW_SetIntOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, int value);` |
| `SetNullAt` | method | `BOOL CkJsonObjectW_SetNullAt(HCkJsonObjectW cHandle, int index);` |
| `SetNullOf` | method | `BOOL CkJsonObjectW_SetNullOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `SetNumberAt` | method | `BOOL CkJsonObjectW_SetNumberAt(HCkJsonObjectW cHandle, int index, const wchar_t *value);` |
| `SetNumberOf` | method | `BOOL CkJsonObjectW_SetNumberOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value);` |
| `SetStringAt` | method | `BOOL CkJsonObjectW_SetStringAt(HCkJsonObjectW cHandle, int index, const wchar_t *value);` |
| `SetStringOf` | method | `BOOL CkJsonObjectW_SetStringOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value);` |
| `SizeOfArray` | method | `int CkJsonObjectW_SizeOfArray(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `Sort` | method | `void CkJsonObjectW_Sort(HCkJsonObjectW cHandle, BOOL ascending, BOOL caseSensitive);` |
| `StringAt` | method | `BOOL CkJsonObjectW_StringAt(HCkJsonObjectW cHandle, int index, const wchar_t *outStr); const wchar_t *CkJsonObjectW_stringAt(HCkJsonObjectW cHandle, int index);` |
| `StringOf` | method | `BOOL CkJsonObjectW_StringOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *outStr); const wchar_t *CkJsonObjectW_stringOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `StringOfEquals` | method | `BOOL CkJsonObjectW_StringOfEquals(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value, BOOL caseSensitive);` |
| `StringOfSb` | method | `BOOL CkJsonObjectW_StringOfSb(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkStringBuilderW sb);` |
| `Swap` | method | `BOOL CkJsonObjectW_Swap(HCkJsonObjectW cHandle, int index1, int index2);` |
| `TypeAt` | method | `int CkJsonObjectW_TypeAt(HCkJsonObjectW cHandle, int index);` |
| `UIntOf` | method | `unsigned long CkJsonObjectW_UIntOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `UpdateBd` | method | `BOOL CkJsonObjectW_UpdateBd(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *encoding, HCkBinDataW bd);` |
| `UpdateBool` | method | `BOOL CkJsonObjectW_UpdateBool(HCkJsonObjectW cHandle, const wchar_t *jsonPath, BOOL value);` |
| `UpdateInt` | method | `BOOL CkJsonObjectW_UpdateInt(HCkJsonObjectW cHandle, const wchar_t *jsonPath, int value);` |
| `UpdateNewArray` | method | `BOOL CkJsonObjectW_UpdateNewArray(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `UpdateNewObject` | method | `BOOL CkJsonObjectW_UpdateNewObject(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `UpdateNull` | method | `BOOL CkJsonObjectW_UpdateNull(HCkJsonObjectW cHandle, const wchar_t *jsonPath);` |
| `UpdateNumber` | method | `BOOL CkJsonObjectW_UpdateNumber(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *numericStr);` |
| `UpdateSb` | method | `BOOL CkJsonObjectW_UpdateSb(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkStringBuilderW sb);` |
| `UpdateString` | method | `BOOL CkJsonObjectW_UpdateString(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value);` |
| `UpdateUInt` | method | `BOOL CkJsonObjectW_UpdateUInt(HCkJsonObjectW cHandle, const wchar_t *jsonPath, unsigned long value);` |
| `WriteFile` | method | `BOOL CkJsonObjectW_WriteFile(HCkJsonObjectW cHandle, const wchar_t *path);` |

Deprecated members are listed at the end of this file with their replacements; do not use them in new code.

## Properties

### JsonObject.DelimiterChar

`Chilkat 11.7.0 · wc · JsonObject · DelimiterChar · property · read/write · since 9.5.0.58`

```c
void CkJsonObjectW_getDelimiterChar(HCkJsonObjectW cHandle, HCkString retval);
void CkJsonObjectW_putDelimiterChar(HCkJsonObjectW cHandle, const wchar_t *newVal);
const wchar_t *CkJsonObjectW_delimiterChar(HCkJsonObjectW cHandle);
```

Specifies the character used to separate object-member names in Chilkat JSON paths. The default is `.`. Set it to `/` for Firebase-style paths. This property should contain exactly one character.

**Arrays in paths:** Array indexes continue to use square brackets, such as `orders[0].id`. If a member name itself contains a path-separator character, quote that path component with double quotes.

### JsonObject.EmitCompact

`Chilkat 11.7.0 · wc · JsonObject · EmitCompact · property · read/write · since 9.5.0.56`

```c
BOOL CkJsonObjectW_getEmitCompact(HCkJsonObjectW cHandle);
void CkJsonObjectW_putEmitCompact(HCkJsonObjectW cHandle, BOOL newVal);
```

Controls whether emitted JSON is compact or pretty-printed. The default is `TRUE`.

|  |  |
| --- | --- |
| `TRUE` | Emit a compact representation with no extra formatting whitespace. |
| `FALSE` | Emit indented, human-readable JSON. |

**JSON semantics:** Formatting whitespace does not change the JSON data. Use compact output for transport/storage and pretty output for diagnostics or human review.

### JsonObject.EmitCrLf

`Chilkat 11.7.0 · wc · JsonObject · EmitCrLf · property · read/write · since 9.5.0.56`

```c
BOOL CkJsonObjectW_getEmitCrLf(HCkJsonObjectW cHandle);
void CkJsonObjectW_putEmitCrLf(HCkJsonObjectW cHandle, BOOL newVal);
```

Controls line endings when pretty-printed JSON is emitted (`EmitCompact = FALSE`). The default is `TRUE`.

|  |  |
| --- | --- |
| `TRUE` | Use CRLF line endings. |
| `FALSE` | Use LF line endings. |

**Compact output:** This setting has no effect when `EmitCompact` is `TRUE` because compact JSON is emitted without formatting line breaks.

### JsonObject.EnableSecrets

`Chilkat 11.7.0 · wc · JsonObject · EnableSecrets · property · read/write · since 11.5.0`

```c
BOOL CkJsonObjectW_getEnableSecrets(HCkJsonObjectW cHandle);
void CkJsonObjectW_putEnableSecrets(HCkJsonObjectW cHandle, BOOL newVal);
```

**Full documentation for this property (same in every language):** [More Detailed Information About EnableSecrets](https://www.chilkatsoft.com/ai-docs/v/11.7.0/articles/secret_specification_strings.md)

Enables automatic resolution of Chilkat secret specification strings for supported string-setting methods. The default is `FALSE`. When enabled, a value beginning with `!!` can identify a credential stored in Windows Credential Manager or Apple Keychain instead of embedding the literal secret in application code.

Secret specification format: `!![appName|]service[|domain]|username`.

This feature applies to `AddStringAt`, `AppendString`, `SetStringAt`, `SetStringOf`, `UpdateSb`, and `UpdateString`.

**Security:** Secret resolution changes where the string value comes from; the resulting JSON member still contains the resolved value. Avoid emitting or logging JSON that contains credentials unless that exposure is explicitly intended.

### JsonObject.I

`Chilkat 11.7.0 · wc · JsonObject · I · property · read/write · since 9.5.0.56`

```c
int CkJsonObjectW_getI(HCkJsonObjectW cHandle);
void CkJsonObjectW_putI(HCkJsonObjectW cHandle, int newVal);
```

Supplies the integer substituted for `i` when a JSON path contains an array index such as `[i]`. This is useful for loop-based navigation without constructing a new path string for every iteration.

**Related properties:** The `J` and `K` properties provide the same substitution behavior for `[j]` and `[k]`.

### JsonObject.J

`Chilkat 11.7.0 · wc · JsonObject · J · property · read/write · since 9.5.0.56`

```c
int CkJsonObjectW_getJ(HCkJsonObjectW cHandle);
void CkJsonObjectW_putJ(HCkJsonObjectW cHandle, int newVal);
```

Supplies the integer substituted for `j` when a JSON path contains `[j]`. It is commonly used with nested-array paths such as `matrix[i][j]`.

### JsonObject.K

`Chilkat 11.7.0 · wc · JsonObject · K · property · read/write · since 9.5.0.56`

```c
int CkJsonObjectW_getK(HCkJsonObjectW cHandle);
void CkJsonObjectW_putK(HCkJsonObjectW cHandle, int newVal);
```

Supplies the integer substituted for `k` when a JSON path contains `[k]`. It can be combined with `I` and `J` for deeper nested-array traversal.

### JsonObject.LowerCaseNames

`Chilkat 11.7.0 · wc · JsonObject · LowerCaseNames · property · read/write · since 9.5.0.87`

```c
BOOL CkJsonObjectW_getLowerCaseNames(HCkJsonObjectW cHandle);
void CkJsonObjectW_putLowerCaseNames(HCkJsonObjectW cHandle, BOOL newVal);
```

If `TRUE`, member names are converted to lowercase while JSON is loaded by `Load`, `LoadBd`, `LoadSb`, or `LoadFile`. The default is `FALSE`.

**Important:** This changes member names in the parsed document; it is not merely a case-insensitive lookup mode. Use it only when normalizing names is intentional.

### JsonObject.PathPrefix

`Chilkat 11.7.0 · wc · JsonObject · PathPrefix · property · read/write · since 9.5.0.76`

```c
void CkJsonObjectW_getPathPrefix(HCkJsonObjectW cHandle, HCkString retval);
void CkJsonObjectW_putPathPrefix(HCkJsonObjectW cHandle, const wchar_t *newVal);
const wchar_t *CkJsonObjectW_pathPrefix(HCkJsonObjectW cHandle);
```

Specifies a path prefix automatically prepended to JSON paths passed to path-based methods such as `StringOf`, `ObjectOf`, `UpdateString`, `SetBoolOf`, and `SizeOfArray`. The default is the empty string.

**Use case:** Set a prefix when many operations target the same nested object. The individual method calls can then use paths relative to that prefix.

### JsonObject.Size

`Chilkat 11.7.0 · wc · JsonObject · Size · property · read-only · since 9.5.0.56`

```c
int CkJsonObjectW_getSize(HCkJsonObjectW cHandle);
```

Returns the number of direct name/value members in this JSON object. Nested members inside child objects are not included.

**JSON objects and order:** RFC 8259 defines a JSON object as an unordered collection of name/value pairs. Chilkat preserves a member order so index-based APIs and deterministic emission are possible, but interoperable application logic should generally use member names rather than depend on object order.

### JsonObject.Strict

`Chilkat 11.7.0 · wc · JsonObject · Strict · property · read/write · since 11.6.0`

```c
BOOL CkJsonObjectW_getStrict(HCkJsonObjectW cHandle);
void CkJsonObjectW_putStrict(HCkJsonObjectW cHandle, BOOL newVal);
```

When `Strict` is **true**, the Load methods first check that the data is well-formed JSON. If it is not, the load fails and the contents of this JsonObject are left **unchanged**. The default is `FALSE`.

This applies to `Load`, `LoadSb`, `LoadBd`, `LoadFile` and `LoadPredefined`.

Chilkat's JSON parser is deliberately tolerant. By default it can accept text that is not well-formed, succeed, and leave an empty or partially populated document. That is convenient when the goal is a best-effort parse of imperfect input, but it is the wrong behavior when a silently missing member changes what the application does. A single missing comma, for example, can cause the members after it to be dropped while the load still reports success.

Set `Strict` to `TRUE` for JSON carrying configuration, credentials, or security parameters, where a member that quietly failed to load would be acted on as though it had never been specified.

**Note:** The default is `FALSE` so that existing applications are unaffected. When a strict load is rejected, this JsonObject keeps whatever it held before the call, so a failed reload never leaves the object empty.

### JsonObject.UncommonOptions

`Chilkat 11.7.0 · wc · JsonObject · UncommonOptions · property · read/write · since 9.5.0.90`

```c
void CkJsonObjectW_getUncommonOptions(HCkJsonObjectW cHandle, HCkString retval);
void CkJsonObjectW_putUncommonOptions(HCkJsonObjectW cHandle, const wchar_t *newVal);
const wchar_t *CkJsonObjectW_uncommonOptions(HCkJsonObjectW cHandle);
```

Provides a catch-all string for uncommon, implementation-specific options. The default is the empty string and it should normally remain empty.

**Recommendation:** Do not invent option keywords. Set this property only when a specific `JsonObject` option is documented by Chilkat or provided by Chilkat support.

## Methods

### JsonObject.AddArrayAt

`Chilkat 11.7.0 · wc · JsonObject · AddArrayAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_AddArrayAt(HCkJsonObjectW cHandle, int index, const wchar_t *name);
```

Inserts a new JSON array member named `name` at the zero-based member position `index`. The new array is empty.

|  |  |
| --- | --- |
| `0` | Insert as the first member. |
| `-1` | Append as the last member. |
| `n` | Insert at zero-based position n. |

**Member name vs. JSON path:** `name` is a direct member name, not a JSON path. Use an `Update*` or `Set*Of` method when addressing a nested value by path.

Returns TRUE for success, FALSE for failure.

### JsonObject.AddArrayCopyAt

`Chilkat 11.7.0 · wc · JsonObject · AddArrayCopyAt · method · since 9.5.0.82`

```c
BOOL CkJsonObjectW_AddArrayCopyAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, HCkJsonArrayW jarr);
```

Inserts a new JSON array member named `name` at the zero-based member position `index`. The array value is copied from `jarr`; subsequent changes to the source array do not modify the inserted copy.

|  |  |
| --- | --- |
| `0` | Insert as the first member. |
| `-1` | Append as the last member. |
| `n` | Insert at zero-based position n. |

**Member name vs. JSON path:** `name` is a direct member name, not a JSON path. Use an `Update*` or `Set*Of` method when addressing a nested value by path.

Returns TRUE for success, FALSE for failure.

### JsonObject.AddBoolAt

`Chilkat 11.7.0 · wc · JsonObject · AddBoolAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_AddBoolAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, BOOL value);
```

Inserts a new JSON boolean member named `name` at the zero-based member position `index`. The value is taken from `value`.

|  |  |
| --- | --- |
| `0` | Insert as the first member. |
| `-1` | Append as the last member. |
| `n` | Insert at zero-based position n. |

**Member name vs. JSON path:** `name` is a direct member name, not a JSON path. Use an `Update*` or `Set*Of` method when addressing a nested value by path.

Returns TRUE for success, FALSE for failure.

### JsonObject.AddIntAt

`Chilkat 11.7.0 · wc · JsonObject · AddIntAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_AddIntAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, int value);
```

Inserts a new JSON number member named `name` at the zero-based member position `index`. The integer `value` is emitted as a JSON number, not as a quoted string.

|  |  |
| --- | --- |
| `0` | Insert as the first member. |
| `-1` | Append as the last member. |
| `n` | Insert at zero-based position n. |

**Member name vs. JSON path:** `name` is a direct member name, not a JSON path. Use an `Update*` or `Set*Of` method when addressing a nested value by path.

Returns TRUE for success, FALSE for failure.

### JsonObject.AddNullAt

`Chilkat 11.7.0 · wc · JsonObject · AddNullAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_AddNullAt(HCkJsonObjectW cHandle, int index, const wchar_t *name);
```

Inserts a new JSON null member named `name` at the zero-based member position `index`.

|  |  |
| --- | --- |
| `0` | Insert as the first member. |
| `-1` | Append as the last member. |
| `n` | Insert at zero-based position n. |

**Member name vs. JSON path:** `name` is a direct member name, not a JSON path. Use an `Update*` or `Set*Of` method when addressing a nested value by path.

Returns TRUE for success, FALSE for failure.

### JsonObject.AddNumberAt

`Chilkat 11.7.0 · wc · JsonObject · AddNumberAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_AddNumberAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, const wchar_t *numericStr);
```

Inserts a new JSON number member named `name` at the zero-based member position `index`. The `numericStr` argument supplies the exact JSON numeric text to store.

|  |  |
| --- | --- |
| `0` | Insert as the first member. |
| `-1` | Append as the last member. |
| `n` | Insert at zero-based position n. |

**Member name vs. JSON path:** `name` is a direct member name, not a JSON path. Use an `Update*` or `Set*Of` method when addressing a nested value by path.

**Exact numeric text:** Use this method when lexical form or precision matters, for example `12345678901234567890`, `1.2500`, or scientific notation. The supplied text must be valid JSON number syntax; JSON does not permit `NaN` or infinity.

Returns TRUE for success, FALSE for failure.

### JsonObject.AddObjectAt

`Chilkat 11.7.0 · wc · JsonObject · AddObjectAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_AddObjectAt(HCkJsonObjectW cHandle, int index, const wchar_t *name);
```

Inserts a new JSON object member named `name` at the zero-based member position `index`. The new object is empty.

|  |  |
| --- | --- |
| `0` | Insert as the first member. |
| `-1` | Append as the last member. |
| `n` | Insert at zero-based position n. |

**Member name vs. JSON path:** `name` is a direct member name, not a JSON path. Use an `Update*` or `Set*Of` method when addressing a nested value by path.

Returns TRUE for success, FALSE for failure.

### JsonObject.AddObjectCopyAt

`Chilkat 11.7.0 · wc · JsonObject · AddObjectCopyAt · method · since 9.5.0.82`

```c
BOOL CkJsonObjectW_AddObjectCopyAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, HCkJsonObjectW jsonObj);
```

Inserts a new JSON object member named `name` at the zero-based member position `index`. The object value is copied from `jsonObj`; the inserted value is independent of the source.

|  |  |
| --- | --- |
| `0` | Insert as the first member. |
| `-1` | Append as the last member. |
| `n` | Insert at zero-based position n. |

**Member name vs. JSON path:** `name` is a direct member name, not a JSON path. Use an `Update*` or `Set*Of` method when addressing a nested value by path.

Returns TRUE for success, FALSE for failure.

### JsonObject.AddStringAt

`Chilkat 11.7.0 · wc · JsonObject · AddStringAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_AddStringAt(HCkJsonObjectW cHandle, int index, const wchar_t *name, const wchar_t *value);
```

Inserts a new JSON string member named `name` at the zero-based member position `index`. The value is stored as a JSON string and is escaped as needed when emitted.

|  |  |
| --- | --- |
| `0` | Insert as the first member. |
| `-1` | Append as the last member. |
| `n` | Insert at zero-based position n. |

**Member name vs. JSON path:** `name` is a direct member name, not a JSON path. Use an `Update*` or `Set*Of` method when addressing a nested value by path.

Returns TRUE for success, FALSE for failure.

### JsonObject.AppendArray

`Chilkat 11.7.0 · wc · JsonObject · AppendArray · method · since 9.5.0.58`

```c
HCkJsonArrayW CkJsonObjectW_AppendArray(HCkJsonObjectW cHandle, const wchar_t *name);
```

Appends a new JSON array member named `name` to this object. The newly appended array is empty and the returned `JsonArray` references that array in this document, so changes made through it modify the same JSON tree.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns `NULL` on failure

### JsonObject.AppendArray2

`Chilkat 11.7.0 · wc · JsonObject · AppendArray2 · method · since 11.0.0`

```c
BOOL CkJsonObjectW_AppendArray2(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonArrayW jarr);
```

Appends a new JSON array member named `name` to this object. A new empty array is created and `jarr` is updated to reference it. The method returns `TRUE` on success.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns TRUE for success, FALSE for failure.

### JsonObject.AppendArrayCopy

`Chilkat 11.7.0 · wc · JsonObject · AppendArrayCopy · method · since 9.5.0.82`

```c
BOOL CkJsonObjectW_AppendArrayCopy(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonArrayW jarr);
```

Appends a new JSON array member named `name` to this object. The array is copied from `jarr`, so the appended array is independent of the source array.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns TRUE for success, FALSE for failure.

### JsonObject.AppendBool

`Chilkat 11.7.0 · wc · JsonObject · AppendBool · method · since 9.5.0.58`

```c
BOOL CkJsonObjectW_AppendBool(HCkJsonObjectW cHandle, const wchar_t *name, BOOL value);
```

Appends a new JSON boolean member named `name` to this object. The value is taken from `value`.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns TRUE for success, FALSE for failure.

### JsonObject.AppendInt

`Chilkat 11.7.0 · wc · JsonObject · AppendInt · method · since 9.5.0.58`

```c
BOOL CkJsonObjectW_AppendInt(HCkJsonObjectW cHandle, const wchar_t *name, int value);
```

Appends a new JSON number member named `name` to this object. The integer value is stored as a JSON number.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns TRUE for success, FALSE for failure.

### JsonObject.AppendObject

`Chilkat 11.7.0 · wc · JsonObject · AppendObject · method · since 9.5.0.58`

```c
HCkJsonObjectW CkJsonObjectW_AppendObject(HCkJsonObjectW cHandle, const wchar_t *name);
```

Appends a new JSON object member named `name` to this object. The newly appended object is empty and the returned `JsonObject` references that object in this document.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns `NULL` on failure

### JsonObject.AppendObject2

`Chilkat 11.7.0 · wc · JsonObject · AppendObject2 · method · since 11.0.0`

```c
BOOL CkJsonObjectW_AppendObject2(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonObjectW jsonObj);
```

Appends a new JSON object member named `name` to this object. A new empty object is created and `jsonObj` is updated to reference it. The method returns `TRUE` on success.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns TRUE for success, FALSE for failure.

### JsonObject.AppendObjectCopy

`Chilkat 11.7.0 · wc · JsonObject · AppendObjectCopy · method · since 9.5.0.82`

```c
BOOL CkJsonObjectW_AppendObjectCopy(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonObjectW jsonObj);
```

Appends a new JSON object member named `name` to this object. The object is copied from `jsonObj`, so the appended object is independent of the source object.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns TRUE for success, FALSE for failure.

### JsonObject.AppendString

`Chilkat 11.7.0 · wc · JsonObject · AppendString · method · since 9.5.0.58`

```c
BOOL CkJsonObjectW_AppendString(HCkJsonObjectW cHandle, const wchar_t *name, const wchar_t *value);
```

Appends a new JSON string member named `name` to this object. The value is JSON-escaped as needed when emitted.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns TRUE for success, FALSE for failure.

### JsonObject.AppendStringArray

`Chilkat 11.7.0 · wc · JsonObject · AppendStringArray · method · since 9.5.0.67`

```c
BOOL CkJsonObjectW_AppendStringArray(HCkJsonObjectW cHandle, const wchar_t *name, HCkStringTableW values);
```

Appends a new JSON array member named `name` to this object. The array is populated with the strings contained in `values`.

**Member name vs. JSON path:** `name` is a direct member name. It is not interpreted as a JSON path. Use the corresponding `Update*` method when a nested path should be addressed or created.

Returns TRUE for success, FALSE for failure.

### JsonObject.ArrayAt

`Chilkat 11.7.0 · wc · JsonObject · ArrayAt · method · since 9.5.0.56`

```c
HCkJsonArrayW CkJsonObjectW_ArrayAt(HCkJsonObjectW cHandle, int index);
```

Returns the JSON array stored in the member at zero-based position `index`. The returned `JsonArray` references the existing array in the same document; it is not a detached copy.

**Type requirement:** The member at `index` must be an array. Use `TypeAt` when the member type is not already known.

Returns `NULL` on failure

### JsonObject.ArrayAt2

`Chilkat 11.7.0 · wc · JsonObject · ArrayAt2 · method · since 11.0.0`

```c
BOOL CkJsonObjectW_ArrayAt2(HCkJsonObjectW cHandle, int index, HCkJsonArrayW jarr);
```

Updates `jarr` to reference the JSON array stored at zero-based member position `index` and returns `TRUE` on success.

Returns TRUE for success, FALSE for failure.

### JsonObject.ArrayOf

`Chilkat 11.7.0 · wc · JsonObject · ArrayOf · method · since 9.5.0.56`

```c
HCkJsonArrayW CkJsonObjectW_ArrayOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns the JSON array at `jsonPath`. The returned `JsonArray` references the existing array in the same document, so modifications through it are reflected in the parent JSON.

**JSON paths:** Paths are relative to this object and may include object-member separators and array indexes, for example `orders[0].items`.

Returns `NULL` on failure

### JsonObject.ArrayOf2

`Chilkat 11.7.0 · wc · JsonObject · ArrayOf2 · method · since 11.1.0`

```c
BOOL CkJsonObjectW_ArrayOf2(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkJsonArrayW jarr);
```

Updates `jarr` to reference the JSON array at `jsonPath` and returns `TRUE` on success.

Returns TRUE for success, FALSE for failure.

### JsonObject.BoolAt

`Chilkat 11.7.0 · wc · JsonObject · BoolAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_BoolAt(HCkJsonObjectW cHandle, int index);
```

Returns the boolean value of the member at zero-based position `index`.

**Indexing:** Member indexes are based on the order maintained by this `JsonObject` instance. JSON objects are semantically unordered, so application protocols should normally identify values by member name rather than by position.

### JsonObject.BoolOf

`Chilkat 11.7.0 · wc · JsonObject · BoolOf · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_BoolOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns the boolean value at `jsonPath`. The path is evaluated relative to this `JsonObject`, after applying `PathPrefix` if one is set.

### JsonObject.BytesOf

`Chilkat 11.7.0 · wc · JsonObject · BytesOf · method · since 9.5.0.68`

```c
BOOL CkJsonObjectW_BytesOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *encoding, HCkBinDataW bd);
```

Reads the string value at `jsonPath`, decodes it using `encoding` (for example, `base64` or `hex`), and appends the resulting bytes to `bd`.

**Binary-in-JSON convention:** The JSON member itself is text. The `encoding` argument tells Chilkat how that text represents the original bytes.

Returns TRUE for success, FALSE for failure.

### JsonObject.Clear

`Chilkat 11.7.0 · wc · JsonObject · Clear · method · since 9.5.0.76`

```c
void CkJsonObjectW_Clear(HCkJsonObjectW cHandle);
```

Removes all members from this JSON object, leaving an empty object equivalent to `{}`.

### JsonObject.CopyRef

`Chilkat 11.7.0 · wc · JsonObject · CopyRef · method · since 11.0.0`

```c
BOOL CkJsonObjectW_CopyRef(HCkJsonObjectW cHandle, HCkJsonObjectW jsonObj);
```

Updates `jsonObj` so that it references the same JSON object as the caller. No JSON data is copied.

**Shared state:** After this call, modifications through either reference affect the same underlying JSON object.

Returns TRUE for success, FALSE for failure.

### JsonObject.DateOf

`Chilkat 11.7.0 · wc · JsonObject · DateOf · method · since 9.5.0.73`

```c
BOOL CkJsonObjectW_DateOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkDateTimeW dt);
```

Parses the date/time value at `jsonPath` and loads the result into `dt`. Recognized forms include ISO 8601 timestamps (for example, `2009-11-04T19:55:41Z`), RFC 822-style date/time strings, and Unix timestamp integers.

**JSON has no native date type:** Dates in JSON are application conventions, usually represented as strings or numbers. This method recognizes common conventions and converts them to `CkDateTime`.

Returns TRUE for success, FALSE for failure.

### JsonObject.Delete

`Chilkat 11.7.0 · wc · JsonObject · Delete · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_Delete(HCkJsonObjectW cHandle, const wchar_t *name);
```

Deletes the direct member named `name` from this JSON object.

**Not a path:** `name` is a member name, not a JSON path. Use a path-based operation when deleting or replacing a nested value requires navigation first.

Returns TRUE for success, FALSE for failure.

### JsonObject.DeleteAt

`Chilkat 11.7.0 · wc · JsonObject · DeleteAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_DeleteAt(HCkJsonObjectW cHandle, int index);
```

Deletes the member at zero-based position `index`. Members after the deleted position shift toward the beginning.

Returns TRUE for success, FALSE for failure.

### JsonObject.DeleteRecords

`Chilkat 11.7.0 · wc · JsonObject · DeleteRecords · method · since 9.5.0.88`

```c
int CkJsonObjectW_DeleteRecords(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relpath, const wchar_t *value, BOOL caseSensitive);
```

Deletes every object record in the array at `arrayPath` whose value at relative path `relpath` equals or wildcard-matches `value`. The `caseSensitive` argument controls matching. Returns the number of records deleted.

### JsonObject.DtOf

`Chilkat 11.7.0 · wc · JsonObject · DtOf · method · since 9.5.0.73`

```c
BOOL CkJsonObjectW_DtOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, BOOL bLocal, HCkDtObjW dt);
```

Parses the date/time value at `jsonPath` into `dt`. If `bLocal` is `TRUE`, the destination receives local date/time fields; otherwise it receives UTC/GMT fields. Recognized inputs include ISO 8601 timestamps, RFC 822-style date/time strings, and Unix timestamp integers.

Returns TRUE for success, FALSE for failure.

### JsonObject.Emit

`Chilkat 11.7.0 · wc · JsonObject · Emit · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_Emit(HCkJsonObjectW cHandle, const wchar_t *outStr);
const wchar_t *CkJsonObjectW_emit(HCkJsonObjectW cHandle);
```

Serializes the JSON document rooted at this object and returns the JSON text. Formatting is controlled by `EmitCompact` and, for pretty output, `EmitCrLf`.

**Object member order:** Chilkat emits members in its maintained order, but JSON object ordering is not semantically significant under RFC 8259.

Returns TRUE for success, FALSE for failure.

### JsonObject.EmitBd

`Chilkat 11.7.0 · wc · JsonObject · EmitBd · method · since 9.5.0.77`

```c
BOOL CkJsonObjectW_EmitBd(HCkJsonObjectW cHandle, HCkBinDataW bd);
```

Serializes this JSON and appends the resulting bytes to `bd`.

**Append behavior:** Existing data in the destination `BinData` is preserved.

Returns TRUE for success, FALSE for failure.

### JsonObject.EmitSb

`Chilkat 11.7.0 · wc · JsonObject · EmitSb · method · since 9.5.0.62`

```c
BOOL CkJsonObjectW_EmitSb(HCkJsonObjectW cHandle, HCkStringBuilderW sb);
```

Serializes this JSON and appends the resulting text to `sb`. Formatting follows `EmitCompact` and `EmitCrLf`.

**Append behavior:** Existing text in the destination `StringBuilder` is preserved; the emitted JSON is added after it.

Returns TRUE for success, FALSE for failure.

### JsonObject.EmitWithSubs

`Chilkat 11.7.0 · wc · JsonObject · EmitWithSubs · method · since 9.5.0.67`

```c
BOOL CkJsonObjectW_EmitWithSubs(HCkJsonObjectW cHandle, HCkHashtableW subs, BOOL omitEmpty, const wchar_t *outStr);
const wchar_t *CkJsonObjectW_emitWithSubs(HCkJsonObjectW cHandle, HCkHashtableW subs, BOOL omitEmpty);
```

Serializes the JSON after substituting variables from `subs` into template strings. A placeholder such as `{$name}` is replaced by the corresponding hashtable value. Prefixing the variable name with `i.`, as in `{$i.count}`, emits the substituted value as a JSON integer instead of a quoted string.

If `omitEmpty` is `TRUE`, members whose substituted result is an empty string or empty array are omitted from the emitted JSON.

**Template reuse:** This method does not require rebuilding the JSON template. It is commonly paired with `Predefine` and `LoadPredefined` when the same JSON shape is emitted repeatedly with different values.

Returns TRUE for success, FALSE for failure.

### JsonObject.FindObjectWithMember

`Chilkat 11.7.0 · wc · JsonObject · FindObjectWithMember · method · since 9.5.0.67`

```c
HCkJsonObjectW CkJsonObjectW_FindObjectWithMember(HCkJsonObjectW cHandle, const wchar_t *name);
```

Recursively searches this JSON subtree for the first JSON object containing a direct member named `name`. Returns that object, or `NULL` if no matching object is found.

Returns `NULL` on failure

### JsonObject.FindObjectWithMember2

`Chilkat 11.7.0 · wc · JsonObject · FindObjectWithMember2 · method · since 11.0.0`

```c
BOOL CkJsonObjectW_FindObjectWithMember2(HCkJsonObjectW cHandle, const wchar_t *name, HCkJsonObjectW jsonObj);
```

Recursively searches this JSON subtree for the first object containing a direct member named `name`. On success, `jsonObj` is updated to reference the matching object and the method returns `TRUE`.

Returns TRUE for success, FALSE for failure.

### JsonObject.FindRecord

`Chilkat 11.7.0 · wc · JsonObject · FindRecord · method · since 9.5.0.63`

```c
HCkJsonObjectW CkJsonObjectW_FindRecord(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relPath, const wchar_t *value, BOOL caseSensitive);
```

Searches the JSON array at `arrayPath` for the first object whose value at relative path `relPath` equals or wildcard-matches `value`. The `caseSensitive` argument controls string comparison. Returns the matching record object.

**Wildcard matching:** The search value may contain `*` to match zero or more characters. `relPath` is evaluated relative to each record object in the array.

Returns `NULL` on failure

### JsonObject.FindRecord2

`Chilkat 11.7.0 · wc · JsonObject · FindRecord2 · method · since 11.0.0`

```c
BOOL CkJsonObjectW_FindRecord2(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relPath, const wchar_t *value, BOOL caseSensitive, HCkJsonObjectW jsonObj);
```

Searches the JSON array at `arrayPath` using the same matching rules as `FindRecord`. On success, `jsonObj` is updated to reference the first matching record and the method returns `TRUE`.

**Reference semantics:** The destination references the record in the original JSON document; changes made through `jsonObj` modify that record.

Returns TRUE for success, FALSE for failure.

### JsonObject.FindRecordString

`Chilkat 11.7.0 · wc · JsonObject · FindRecordString · method · since 9.5.0.63`

```c
BOOL CkJsonObjectW_FindRecordString(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relPath, const wchar_t *value, BOOL caseSensitive, const wchar_t *retRelPath, const wchar_t *outStr);
const wchar_t *CkJsonObjectW_findRecordString(HCkJsonObjectW cHandle, const wchar_t *arrayPath, const wchar_t *relPath, const wchar_t *value, BOOL caseSensitive, const wchar_t *retRelPath);
```

Searches the JSON array at `arrayPath` for the first record whose `relPath` value equals or wildcard-matches `value`, then returns the value at `retRelPath` from that same record as a string.

**Typical use:** This is useful for lookups such as “find the record where `Name` is `Advertising` and return its `Id`.” The `*` wildcard may be used in `value`.

Returns TRUE for success, FALSE for failure.

### JsonObject.FirebaseApplyEvent

`Chilkat 11.7.0 · wc · JsonObject · FirebaseApplyEvent · method · since 9.5.0.58`

```c
BOOL CkJsonObjectW_FirebaseApplyEvent(HCkJsonObjectW cHandle, const wchar_t *name, const wchar_t *data);
```

Applies a Firebase Realtime Database event to this JSON object. `name` should be `put` or `patch`, and `data` should contain event JSON such as `{"path":"/","data":{"a":1,"b":2}}`.

**Purpose:** This method is useful when maintaining a local JSON representation from Firebase server-sent events: `put` replaces the value at a path, while `patch` updates individual child keys.

Returns TRUE for success, FALSE for failure.

### JsonObject.FirebasePatch

`Chilkat 11.7.0 · wc · JsonObject · FirebasePatch · method · since 9.5.0.58`

```c
BOOL CkJsonObjectW_FirebasePatch(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *jsonData);
```

Applies Firebase-style patch semantics at `jsonPath`. `jsonData` must contain a JSON object; each key in that object updates or adds the corresponding key at the target path.

**Relative path:** `jsonPath` is relative to this `JsonObject`.

Returns TRUE for success, FALSE for failure.

### JsonObject.FirebasePut

`Chilkat 11.7.0 · wc · JsonObject · FirebasePut · method · since 9.5.0.58`

```c
BOOL CkJsonObjectW_FirebasePut(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value);
```

Applies Firebase-style put semantics at `jsonPath`, replacing or inserting the value at that path. `value` is JSON text and may represent an object, array, number, boolean, `null`, or a quoted JSON string.

**Quoted strings:** To store a string through this method, `value` must contain a valid JSON string literal, including its surrounding double quotes. Use `UpdateString` when you already have an ordinary application string.

Returns TRUE for success, FALSE for failure.

### JsonObject.GetDocRoot

`Chilkat 11.7.0 · wc · JsonObject · GetDocRoot · method · since 9.5.0.56`

```c
HCkJsonObjectW CkJsonObjectW_GetDocRoot(HCkJsonObjectW cHandle);
```

Returns a `JsonObject` reference to the root object of the JSON document containing this object. This can be called from any nested object reference.

**Shared document lifetime:** Nested `JsonObject` references share the same underlying JSON document. The document remains available while at least one such reference is retained by the application.

Returns `NULL` on failure

### JsonObject.GetDocRoot2

`Chilkat 11.7.0 · wc · JsonObject · GetDocRoot2 · method · since 11.0.0`

```c
BOOL CkJsonObjectW_GetDocRoot2(HCkJsonObjectW cHandle, HCkJsonObjectW docRoot);
```

Updates `docRoot` to reference the root object of the JSON document containing the caller and returns `TRUE` on success.

**Reference semantics:** The destination is another reference into the same underlying document; it is not a copy.

Returns TRUE for success, FALSE for failure.

### JsonObject.HasMember

`Chilkat 11.7.0 · wc · JsonObject · HasMember · method · since 9.5.0.58`

```c
BOOL CkJsonObjectW_HasMember(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns `TRUE` if a value exists at `jsonPath`; otherwise returns `FALSE`.

**Missing vs. null:** A member whose JSON value is `null` still exists. Use `IsNullOf` to test specifically for JSON `null`.

Returns TRUE for success, FALSE for failure.

### JsonObject.IndexOf

`Chilkat 11.7.0 · wc · JsonObject · IndexOf · method · since 9.5.0.56`

```c
int CkJsonObjectW_IndexOf(HCkJsonObjectW cHandle, const wchar_t *name);
```

Returns the zero-based position of the direct member named `name`, or `-1` if that member name is not found.

**Not a path:** `name` is searched only among the direct members of this object.

### JsonObject.IntAt

`Chilkat 11.7.0 · wc · JsonObject · IntAt · method · since 9.5.0.56`

```c
int CkJsonObjectW_IntAt(HCkJsonObjectW cHandle, int index);
```

Returns the integer value of the member at zero-based position `index`.

**Indexing:** Member indexes are based on the order maintained by this `JsonObject` instance. JSON objects are semantically unordered, so application protocols should normally identify values by member name rather than by position.

### JsonObject.IntOf

`Chilkat 11.7.0 · wc · JsonObject · IntOf · method · since 9.5.0.56`

```c
int CkJsonObjectW_IntOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns the integer value at `jsonPath`. The path is evaluated relative to this `JsonObject`, after applying `PathPrefix` if one is set.

**Large numbers:** Use `StringOf` or the exact numeric-text APIs when a JSON integer may exceed the range of the language binding's integer type.

### JsonObject.IsNullAt

`Chilkat 11.7.0 · wc · JsonObject · IsNullAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_IsNullAt(HCkJsonObjectW cHandle, int index);
```

Returns `TRUE` if the member at zero-based position `index` has the JSON value `null`; otherwise returns `FALSE`.

### JsonObject.IsNullOf

`Chilkat 11.7.0 · wc · JsonObject · IsNullOf · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_IsNullOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns `TRUE` if the value at `jsonPath` is the JSON literal `null`; otherwise returns `FALSE`.

**Null is a value:** JSON `null` is different from a missing member and from an empty string. Use `HasMember` when existence must be tested separately.

### JsonObject.JsonTypeOf

`Chilkat 11.7.0 · wc · JsonObject · JsonTypeOf · method · since 9.5.0.68`

```c
int CkJsonObjectW_JsonTypeOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns an integer identifying the JSON type of the value at `jsonPath`. Returns `-1` if no member exists at that path.

|  |  |
| --- | --- |
| `1` | string |
| `2` | number |
| `3` | object |
| `4` | array |
| `5` | boolean |
| `6` | null |

### JsonObject.Load

`Chilkat 11.7.0 · wc · JsonObject · Load · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_Load(HCkJsonObjectW cHandle, const wchar_t *json);
```

Parses the JSON text in `json` and loads the parsed data into this object for DOM-style access and modification.

**JSON data model:** JSON values are strings, numbers, booleans, `null`, objects, or arrays. Object member names should be unique for interoperable JSON; RFC 8259 notes that consumers differ in how duplicate names are handled.

Returns TRUE for success, FALSE for failure.

### JsonObject.LoadBd

`Chilkat 11.7.0 · wc · JsonObject · LoadBd · method · since 9.5.0.77`

```c
BOOL CkJsonObjectW_LoadBd(HCkJsonObjectW cHandle, HCkBinDataW bd);
```

Parses JSON from the bytes contained in `bd` and loads it into this object.

Returns TRUE for success, FALSE for failure.

### JsonObject.LoadFile

`Chilkat 11.7.0 · wc · JsonObject · LoadFile · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_LoadFile(HCkJsonObjectW cHandle, const wchar_t *path);
```

Reads JSON text from the file at `path`, parses it, and loads the result into this object.

Returns TRUE for success, FALSE for failure.

### JsonObject.LoadPredefined

`Chilkat 11.7.0 · wc · JsonObject · LoadPredefined · method · since 9.5.0.67`

```c
BOOL CkJsonObjectW_LoadPredefined(HCkJsonObjectW cHandle, const wchar_t *name);
```

Loads this object from the predefined JSON document identified by `name`. Predefined documents are created with `Predefine`.

Returns TRUE for success, FALSE for failure.

### JsonObject.LoadSb

`Chilkat 11.7.0 · wc · JsonObject · LoadSb · method · since 9.5.0.62`

```c
BOOL CkJsonObjectW_LoadSb(HCkJsonObjectW cHandle, HCkStringBuilderW sb);
```

Parses JSON from the current contents of `sb` and loads it into this object.

Returns TRUE for success, FALSE for failure.

### JsonObject.MakeCopy

`Chilkat 11.7.0 · wc · JsonObject · MakeCopy · method · since 11.0.0`

```c
BOOL CkJsonObjectW_MakeCopy(HCkJsonObjectW cHandle, HCkJsonObjectW json);
```

Copies this JSON object into `json`. The destination receives an independent JSON copy rather than another reference to the same underlying object.

**Copy vs. reference:** Use `CopyRef` when two `JsonObject` instances should refer to the same JSON object instead of duplicating its data.

Returns TRUE for success, FALSE for failure.

### JsonObject.MoveMember

`Chilkat 11.7.0 · wc · JsonObject · MoveMember · method · since 9.5.0.80`

```c
BOOL CkJsonObjectW_MoveMember(HCkJsonObjectW cHandle, int fromIndex, int toIndex);
```

Moves the direct member at zero-based position `fromIndex` to `toIndex`. Use `toIndex = 0` to move it first or `-1` to move it last.

Returns TRUE for success, FALSE for failure.

### JsonObject.NameAt

`Chilkat 11.7.0 · wc · JsonObject · NameAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_NameAt(HCkJsonObjectW cHandle, int index, const wchar_t *outStr);
const wchar_t *CkJsonObjectW_nameAt(HCkJsonObjectW cHandle, int index);
```

Returns the name of the member at zero-based position `index`. Use this with `Size` and `TypeAt` to iterate through an object's direct members.

Returns TRUE for success, FALSE for failure.

### JsonObject.NewArrayOf

`Chilkat 11.7.0 · wc · JsonObject · NewArrayOf · method · since 11.4.0`

```c
BOOL CkJsonObjectW_NewArrayOf(HCkJsonObjectW cHandle, const wchar_t *path, const wchar_t *jArr);
```

Creates a JSON array at `path` and loads that array from the JSON text in `jArr`. The supplied text should represent a JSON array.

**Difference from UpdateNewArray:** `UpdateNewArray` creates an empty array. `NewArrayOf` creates the array and immediately populates it from JSON text.

Returns TRUE for success, FALSE for failure.

### JsonObject.NewObjectOf

`Chilkat 11.7.0 · wc · JsonObject · NewObjectOf · method · since 11.4.0`

```c
BOOL CkJsonObjectW_NewObjectOf(HCkJsonObjectW cHandle, const wchar_t *path, const wchar_t *jObj);
```

Creates a JSON object at `path` and loads that object from the JSON text in `jObj`. The supplied text should represent a JSON object.

**Difference from UpdateNewObject:** `UpdateNewObject` creates an empty object. `NewObjectOf` creates the object and immediately populates it from JSON text.

Returns TRUE for success, FALSE for failure.

### JsonObject.ObjectAt

`Chilkat 11.7.0 · wc · JsonObject · ObjectAt · method · since 9.5.0.56`

```c
HCkJsonObjectW CkJsonObjectW_ObjectAt(HCkJsonObjectW cHandle, int index);
```

Returns the JSON object stored in the member at zero-based position `index`. The returned `JsonObject` references the existing child object in the same document; changes made through it modify that document.

**Type requirement:** The member at `index` must be a JSON object. Use `TypeAt` when the type is not already known.

Returns `NULL` on failure

### JsonObject.ObjectAt2

`Chilkat 11.7.0 · wc · JsonObject · ObjectAt2 · method · since 11.0.0`

```c
BOOL CkJsonObjectW_ObjectAt2(HCkJsonObjectW cHandle, int index, HCkJsonObjectW jsonObj);
```

Updates `jsonObj` to reference the JSON object stored at zero-based member position `index` and returns `TRUE` on success.

Returns TRUE for success, FALSE for failure.

### JsonObject.ObjectOf

`Chilkat 11.7.0 · wc · JsonObject · ObjectOf · method · since 9.5.0.56`

```c
HCkJsonObjectW CkJsonObjectW_ObjectOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns the JSON object at `jsonPath`. The returned object is a live reference into the same JSON document, not a copy.

**Relative paths:** A path is evaluated relative to the current object. Use `GetDocRoot` when access must start from the document root.

Returns `NULL` on failure

### JsonObject.ObjectOf2

`Chilkat 11.7.0 · wc · JsonObject · ObjectOf2 · method · since 11.0.0`

```c
BOOL CkJsonObjectW_ObjectOf2(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkJsonObjectW jsonObj);
```

Updates `jsonObj` to reference the JSON object at `jsonPath` and returns `TRUE` on success.

Returns TRUE for success, FALSE for failure.

### JsonObject.Predefine

`Chilkat 11.7.0 · wc · JsonObject · Predefine · method · since 9.5.0.67`

```c
BOOL CkJsonObjectW_Predefine(HCkJsonObjectW cHandle, const wchar_t *name);
```

Stores this JSON document in Chilkat's internal global collection of predefined JSON documents under `name`. If the name already exists, the predefined value is replaced.

**Template use:** After predefining a document, another `JsonObject` can load it by name with `LoadPredefined`.

Returns TRUE for success, FALSE for failure.

### JsonObject.Rename

`Chilkat 11.7.0 · wc · JsonObject · Rename · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_Rename(HCkJsonObjectW cHandle, const wchar_t *oldName, const wchar_t *newName);
```

Renames the direct member `oldName` to `newName`. The member value and its position are otherwise unchanged.

**JSON interoperability:** JSON object member names should be unique. Avoid renaming a member to a name already used by another member unless duplicate names are intentionally required.

Returns TRUE for success, FALSE for failure.

### JsonObject.RenameAt

`Chilkat 11.7.0 · wc · JsonObject · RenameAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_RenameAt(HCkJsonObjectW cHandle, int index, const wchar_t *name);
```

Renames the member at zero-based position `index` to `name`. The member value is not changed.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetBoolAt

`Chilkat 11.7.0 · wc · JsonObject · SetBoolAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetBoolAt(HCkJsonObjectW cHandle, int index, BOOL value);
```

Sets the member at zero-based position `index` to a JSON boolean value.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetBoolOf

`Chilkat 11.7.0 · wc · JsonObject · SetBoolOf · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetBoolOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, BOOL value);
```

Sets the value at `jsonPath` to a JSON boolean value.

**Set vs. Update:** Use `UpdateBool` when missing objects or array positions along the path should be created automatically.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetIntAt

`Chilkat 11.7.0 · wc · JsonObject · SetIntAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetIntAt(HCkJsonObjectW cHandle, int index, int value);
```

Sets the member at zero-based position `index` to a JSON number value. The integer is emitted as a JSON number.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetIntOf

`Chilkat 11.7.0 · wc · JsonObject · SetIntOf · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetIntOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, int value);
```

Sets the value at `jsonPath` to an integer JSON number.

**Set vs. Update:** Use `UpdateInt` when missing objects or array positions along the path should be created automatically.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetNullAt

`Chilkat 11.7.0 · wc · JsonObject · SetNullAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetNullAt(HCkJsonObjectW cHandle, int index);
```

Sets the member at zero-based position `index` to a JSON null value.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetNullOf

`Chilkat 11.7.0 · wc · JsonObject · SetNullOf · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetNullOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Sets the value at `jsonPath` to a JSON null value.

**Set vs. Update:** Use `UpdateNull` when missing objects or array positions along the path should be created automatically.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetNumberAt

`Chilkat 11.7.0 · wc · JsonObject · SetNumberAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetNumberAt(HCkJsonObjectW cHandle, int index, const wchar_t *value);
```

Sets the member at zero-based position `index` to a JSON number value. The `value` argument is the exact textual representation of the JSON number.

**JSON number syntax:** The text may contain an integer, fraction, or exponent. It must be valid JSON number syntax; leading zeros (except for zero itself), `NaN`, and infinity are not valid JSON numbers.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetNumberOf

`Chilkat 11.7.0 · wc · JsonObject · SetNumberOf · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetNumberOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value);
```

Sets the value at `jsonPath` to a JSON number value. The `value` argument supplies the exact textual form of the JSON number.

**Set vs. Update:** Use `UpdateNumber` when missing objects or array positions along the path should be created automatically.

**Precision:** Using numeric text avoids an intermediate conversion through a floating-point type and can therefore preserve large integers or application-specific decimal formatting.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetStringAt

`Chilkat 11.7.0 · wc · JsonObject · SetStringAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetStringAt(HCkJsonObjectW cHandle, int index, const wchar_t *value);
```

Sets the member at zero-based position `index` to a JSON string value. The string is escaped as required when JSON is emitted.

Returns TRUE for success, FALSE for failure.

### JsonObject.SetStringOf

`Chilkat 11.7.0 · wc · JsonObject · SetStringOf · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_SetStringOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value);
```

Sets the value at `jsonPath` to a JSON string value. The string is escaped as required when JSON is emitted.

**Set vs. Update:** Use `UpdateString` when missing objects or array positions along the path should be created automatically.

Returns TRUE for success, FALSE for failure.

### JsonObject.SizeOfArray

`Chilkat 11.7.0 · wc · JsonObject · SizeOfArray · method · since 9.5.0.56`

```c
int CkJsonObjectW_SizeOfArray(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns the number of elements in the JSON array at `jsonPath`. Returns `-1` if the path does not resolve to an existing JSON array.

### JsonObject.Sort

`Chilkat 11.7.0 · wc · JsonObject · Sort · method · since 9.5.0.100`

```c
void CkJsonObjectW_Sort(HCkJsonObjectW cHandle, BOOL ascending, BOOL caseSensitive);
```

Sorts this object's direct members by member name. `ascending` selects ascending or descending order, and `caseSensitive` controls how names are compared.

**JSON semantics:** Member ordering is not significant to JSON consumers, but sorting can make emitted JSON deterministic and easier to compare or review.

### JsonObject.StringAt

`Chilkat 11.7.0 · wc · JsonObject · StringAt · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_StringAt(HCkJsonObjectW cHandle, int index, const wchar_t *outStr);
const wchar_t *CkJsonObjectW_stringAt(HCkJsonObjectW cHandle, int index);
```

Returns the string value of the member at zero-based position `index`.

**Indexing:** Member indexes are based on the order maintained by this `JsonObject` instance. JSON objects are semantically unordered, so application protocols should normally identify values by member name rather than by position.

**Non-string values:** `StringOf` can also provide textual representations of scalar JSON values such as numbers, booleans, and `null`; use the type-specific methods when the JSON type itself matters.

Returns TRUE for success, FALSE for failure.

### JsonObject.StringOf

`Chilkat 11.7.0 · wc · JsonObject · StringOf · method · since 9.5.0.56`

```c
BOOL CkJsonObjectW_StringOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *outStr);
const wchar_t *CkJsonObjectW_stringOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns the value at `jsonPath` as text. For a JSON string, the string value is returned. Scalar non-string values such as numbers, booleans, and `null` are returned using their JSON textual representation.

**Type-sensitive code:** Use `JsonTypeOf`, `IntOf`, `BoolOf`, or `IsNullOf` when the distinction between JSON types is important.

Returns TRUE for success, FALSE for failure.

### JsonObject.StringOfEquals

`Chilkat 11.7.0 · wc · JsonObject · StringOfEquals · method · since 9.5.0.96`

```c
BOOL CkJsonObjectW_StringOfEquals(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value, BOOL caseSensitive);
```

Returns `TRUE` if the textual value at `jsonPath` equals `value` according to the `caseSensitive` setting; otherwise returns `FALSE`.

### JsonObject.StringOfSb

`Chilkat 11.7.0 · wc · JsonObject · StringOfSb · method · since 9.5.0.68`

```c
BOOL CkJsonObjectW_StringOfSb(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkStringBuilderW sb);
```

Retrieves the value at `jsonPath` as text and appends it to `sb`.

**Append behavior:** Existing contents of the destination `StringBuilder` are preserved.

Returns TRUE for success, FALSE for failure.

### JsonObject.Swap

`Chilkat 11.7.0 · wc · JsonObject · Swap · method · since 9.5.0.76`

```c
BOOL CkJsonObjectW_Swap(HCkJsonObjectW cHandle, int index1, int index2);
```

Swaps the positions of the direct members at zero-based indexes `index1` and `index2`. Member names and values are unchanged.

**Ordering:** JSON object order is not semantically significant, but Chilkat preserves an order for index-based access and emission.

Returns TRUE for success, FALSE for failure.

### JsonObject.TypeAt

`Chilkat 11.7.0 · wc · JsonObject · TypeAt · method · since 9.5.0.58`

```c
int CkJsonObjectW_TypeAt(HCkJsonObjectW cHandle, int index);
```

Returns an integer identifying the JSON type of the member at zero-based position `index`. Returns `-1` if no member exists at that index.

|  |  |
| --- | --- |
| `1` | string |
| `2` | number |
| `3` | object |
| `4` | array |
| `5` | boolean |
| `6` | null |

### JsonObject.UIntOf

`Chilkat 11.7.0 · wc · JsonObject · UIntOf · method · since 9.5.0.96`

```c
unsigned long CkJsonObjectW_UIntOf(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Returns the unsigned integer value at `jsonPath`.

### JsonObject.UpdateBd

`Chilkat 11.7.0 · wc · JsonObject · UpdateBd · method · since 9.5.0.68`

```c
BOOL CkJsonObjectW_UpdateBd(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *encoding, HCkBinDataW bd);
```

Updates the value at `jsonPath` to a JSON string value, or creates the member and any missing path components as needed. The bytes in `bd` are first encoded according to `encoding` (for example, `base64` or `hex`) and the encoded text is stored as the JSON string value.

**Path-based operation:** `jsonPath` is interpreted using `DelimiterChar`, `PathPrefix`, and the `I`/`J`/`K` index substitutions.

**Binary data in JSON:** JSON has no native byte-array type. Binary content must therefore be represented using a textual encoding agreed upon by the producer and consumer.

Returns TRUE for success, FALSE for failure.

### JsonObject.UpdateBool

`Chilkat 11.7.0 · wc · JsonObject · UpdateBool · method · since 9.5.0.63`

```c
BOOL CkJsonObjectW_UpdateBool(HCkJsonObjectW cHandle, const wchar_t *jsonPath, BOOL value);
```

Updates the value at `jsonPath` to a JSON boolean value, or creates the member and any missing path components as needed.

**Path-based operation:** `jsonPath` is interpreted using `DelimiterChar`, `PathPrefix`, and the `I`/`J`/`K` index substitutions.

Returns TRUE for success, FALSE for failure.

### JsonObject.UpdateInt

`Chilkat 11.7.0 · wc · JsonObject · UpdateInt · method · since 9.5.0.63`

```c
BOOL CkJsonObjectW_UpdateInt(HCkJsonObjectW cHandle, const wchar_t *jsonPath, int value);
```

Updates the value at `jsonPath` to a JSON number value, or creates the member and any missing path components as needed. The integer value is stored as a JSON number.

**Path-based operation:** `jsonPath` is interpreted using `DelimiterChar`, `PathPrefix`, and the `I`/`J`/`K` index substitutions.

Returns TRUE for success, FALSE for failure.

### JsonObject.UpdateNewArray

`Chilkat 11.7.0 · wc · JsonObject · UpdateNewArray · method · since 9.5.0.75`

```c
BOOL CkJsonObjectW_UpdateNewArray(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Creates or replaces the value at `jsonPath` with a new empty JSON array. Missing path components are created automatically as needed.

Returns TRUE for success, FALSE for failure.

### JsonObject.UpdateNewObject

`Chilkat 11.7.0 · wc · JsonObject · UpdateNewObject · method · since 9.5.0.75`

```c
BOOL CkJsonObjectW_UpdateNewObject(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Creates or replaces the value at `jsonPath` with a new empty JSON object. Missing path components are created automatically as needed.

Returns TRUE for success, FALSE for failure.

### JsonObject.UpdateNull

`Chilkat 11.7.0 · wc · JsonObject · UpdateNull · method · since 9.5.0.65`

```c
BOOL CkJsonObjectW_UpdateNull(HCkJsonObjectW cHandle, const wchar_t *jsonPath);
```

Updates the value at `jsonPath` to a JSON null value, or creates the member and any missing path components as needed.

**Path-based operation:** `jsonPath` is interpreted using `DelimiterChar`, `PathPrefix`, and the `I`/`J`/`K` index substitutions.

Returns TRUE for success, FALSE for failure.

### JsonObject.UpdateNumber

`Chilkat 11.7.0 · wc · JsonObject · UpdateNumber · method · since 9.5.0.65`

```c
BOOL CkJsonObjectW_UpdateNumber(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *numericStr);
```

Updates the value at `jsonPath` to a JSON number value, or creates the member and any missing path components as needed. The `numericStr` argument is stored as the exact textual representation of the JSON number.

**Path-based operation:** `jsonPath` is interpreted using `DelimiterChar`, `PathPrefix`, and the `I`/`J`/`K` index substitutions.

**When to use:** Use `UpdateNumber` instead of `UpdateInt` for decimal/exponent forms, very large integers, or when preserving exact numeric text is important.

Returns TRUE for success, FALSE for failure.

### JsonObject.UpdateSb

`Chilkat 11.7.0 · wc · JsonObject · UpdateSb · method · since 9.5.0.68`

```c
BOOL CkJsonObjectW_UpdateSb(HCkJsonObjectW cHandle, const wchar_t *jsonPath, HCkStringBuilderW sb);
```

Updates the value at `jsonPath` to a JSON string value, or creates the member and any missing path components as needed. The new string value is taken from the contents of `sb`.

**Path-based operation:** `jsonPath` is interpreted using `DelimiterChar`, `PathPrefix`, and the `I`/`J`/`K` index substitutions.

Returns TRUE for success, FALSE for failure.

### JsonObject.UpdateString

`Chilkat 11.7.0 · wc · JsonObject · UpdateString · method · since 9.5.0.63`

```c
BOOL CkJsonObjectW_UpdateString(HCkJsonObjectW cHandle, const wchar_t *jsonPath, const wchar_t *value);
```

Updates the value at `jsonPath` to a JSON string value, or creates the member and any missing path components as needed. The supplied string is JSON-escaped as needed.

**Path-based operation:** `jsonPath` is interpreted using `DelimiterChar`, `PathPrefix`, and the `I`/`J`/`K` index substitutions.

**Version note:** Chilkat versions prior to 9.5.0.68 did not correctly escape all characters for this method. Version 9.5.0.68 and later correct that behavior.

Returns TRUE for success, FALSE for failure.

### JsonObject.UpdateUInt

`Chilkat 11.7.0 · wc · JsonObject · UpdateUInt · method · since 9.5.0.96`

```c
BOOL CkJsonObjectW_UpdateUInt(HCkJsonObjectW cHandle, const wchar_t *jsonPath, unsigned long value);
```

Updates the value at `jsonPath` to a JSON number value, or creates the member and any missing path components as needed. The unsigned integer is stored as a JSON number.

**Path-based operation:** `jsonPath` is interpreted using `DelimiterChar`, `PathPrefix`, and the `I`/`J`/`K` index substitutions.

Returns TRUE for success, FALSE for failure.

### JsonObject.WriteFile

`Chilkat 11.7.0 · wc · JsonObject · WriteFile · method · since 9.5.0.76`

```c
BOOL CkJsonObjectW_WriteFile(HCkJsonObjectW cHandle, const wchar_t *path);
```

Serializes this JSON and writes it to the file at `path`. Output formatting follows `EmitCompact` and `EmitCrLf`.

Returns TRUE for success, FALSE for failure.

## Deprecated members — do not use in new code

| Member | Kind | Deprecated in | Use instead |
|---|---|---|---|
| `Clone` | method | before 11.6.1 | `MakeCopy` |

## Related classes

[`BinData`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/wc/classes/BinData.md), [`CkDateTime`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/wc/classes/CkDateTime.md), [`DtObj`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/wc/classes/DtObj.md), [`Hashtable`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/wc/classes/Hashtable.md), [`JsonArray`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/wc/classes/JsonArray.md), [`StringBuilder`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/wc/classes/StringBuilder.md), [`StringTable`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/wc/classes/StringTable.md)

