SetObjectJSON
Object model, document editing
Description
Validates one typed JSON value and replaces the selected existing indirect object while preserving its object and generation numbers. Dictionaries, arrays, streams, scalar values, and references retain their PDF types. Parsing and cloning complete before the object is changed, so malformed input leaves the original object intact
Syntax
Delphi
Function TPDFlib.SetObjectJSON(ObjectNumber: Integer; Const JSON: AnsiString; Options: Integer): Integer;ActiveX
Function PDFlib::SetObjectJSON(ObjectNumber As Long, JSON As String, Options As Long) As LongDLL
int DLSetObjectJSON(int InstanceID, int ObjectNumber, const char* JSON, int Options);Parameters
| ObjectNumber | Existing indirect object number to replace |
|---|---|
| JSON | Typed value returned by GetObjectJSON or extracted from an object graph |
| Options | Must be 0 |
Return values
| 1 | The object was replaced |
|---|---|
| 0 | The object or JSON is invalid; LastErrorCode is 105 |