Skip to main content

PrettyBoxConverter Class

PrettyBoxConverter is a public class manipulating the JSON serialization and de-serialization of Box objects by overriding certain methods in the Newtonsoft.Json.JsonConverter class.

Definition

  • Namespace: UiPath.DocumentProcessing.Contracts
  • Assembly: UiPath.DocumentProcessing.Contracts

Description

A public class that controls the JSON serialization and de-serialization of Box objects, by overriding the WriteJson, ReadJson and CanConvert methods of the Newtonsoft.Json.JsonConverter class.

Members

Methods

  • CanConvert(System.Type objectType) - A method that returns true if the objectType is Box.
  • WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) - A method that serializes a Box object to a float array of four values: Top, Left, Width and Height. These four values are properties of the value object.
  • PrettyBoxConverter() - The protected default constructor.
  • ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) - A method that de-serializes a Box object representation from a float array of four values to a Box object.