Class Factory

A factory class for creating IAnnotation from JSON.

Inheritance
System.Object
Factory
Namespace: PSPDFKit.Pdf.Annotation
Assembly: PSPDFKit.dll
Syntax
public static class Factory

Methods

FromJson(JsonObject)

Constructs the IAnnotation from the Instant JSON representing it. See https://pspdfkit.com/guides/server/current/document/json-format/ If any mandatory properties are missing then an exception will be thrown.

Declaration
public static IAnnotation FromJson(JsonObject json)
Parameters
Type Name Description
Windows.Data.Json.JsonObject json

The Instant JSON representing the IAnnotation.

Returns
Type Description
IAnnotation

The IAnnotation represented by the Instant JSON.

FromPartialJson(JsonObject)

Constructs the IAnnotation from the Instant JSON representing it. See https://pspdfkit.com/guides/server/current/document/json-format/ This method does not require mandatory properties to be present in the JSON. Instead appropriate default values will be used.

Declaration
public static IAnnotation FromPartialJson(JsonObject json)
Parameters
Type Name Description
Windows.Data.Json.JsonObject json

The Instant JSON or partial Instant JSON representing the IAnnotation. Type property is still mandatory.

Returns
Type Description
IAnnotation

The IAnnotation represented by the Instant JSON.