Introduction

Json.NET - Quick Starts & API Documentation
Introduction

Json.NET makes working with JSON formatted data in .NET simple. Quickly read and write JSON using LINQ to JSON or serialize your .NET objects with a single method call using the JsonSerializer.

Features

  • Flexible JSON serializer to convert .NET objects to JSON and back again
  • LINQ to JSON for reading and writing JSON
  • Writes indented, easy to read JSON
  • Convert JSON to and from XML
  • Supports Silverlight and the Compact Framework

The JSON serializer is a good choice when the JSON you are reading or writing maps closely to a .NET class. The serializer automatically reads and writes JSON for the class.

For situations where you are only interested in getting values from JSON, don't have a class to serialize or deserialize to, or the JSON is radically different from your class and you need to manually read and write from your objects then LINQ to JSON is what you should use. LINQ to JSON allows you to easily read, create and modify JSON in .NET.

History

Json.NET grew out of projects I was working on in late 2005 involving JavaScript, AJAX and .NET. At the time there were no libraries for working with JavaScript in .NET so I began to grow my own.

Starting out as a couple of static methods for escaping JavaScript strings, Json.NET evolved as features were added. To add support for reading JSON a major refactor was required and Json.NET will split into the three major classes it still uses today, JsonReader, JsonWriter and JsonSerializer.

Json.NET was first released in June 2006. Since then Json.NET has been downloaded thousands of times by developers and is used in a number of major projects open source projects including MonoRail, Castle Project's MVC web framework, and Mono, an open source implementation of the .NET framework.

~ James Newton-King

Donate

Json.NET is a free open source project that I have developed in my personal time.

I really appreciate your feedback and support for Json.NET and its future development.


Serializing and deserializing JSON

Serializing and deserializing JSON

The quickest method of converting between JSON text and a .NET object is using the JsonSerializer. The JsonSerializer converts .NET objects into their JSON equivalent and back again.

For simple scenarios where you want to convert to and from a JSON string the SerializeObject and DeserializeObject methods on JsonConvert provide an easy to use wrapper over JsonSerializer.

Product product = new Product();

product.Name = "Apple";
product.Expiry = new DateTime(2008, 12, 28);
product.Price = 3.99M;
product.Sizes = new string[] { "Small", "Medium", "Large" };

string output = JsonConvert.SerializeObject(product);
//{
//  "Name": "Apple",
//  "Expiry": "\/Date(1230375600000+1300)\/",
//  "Price": 3.99,
//  "Sizes": [
//    "Small",
//    "Medium",
//    "Large"
//  ]
//}

Product deserializedProduct = JsonConvert.DeserializeObject<Product>(output);

JsonSerializer

For more control over how an object is serialized the JsonSerializer can be used directly. The JsonSerializer is able to read and write JSON text directly to a stream via JsonTextReader and JsonTextWriter. Other kinds of JsonWriters can also be used such as JTokenReader/JTokenWriter to convert your object to and from LINQ to JSON objects or BsonReader/BsonWriter to convert to and from BSON.

Product product = new Product();
product.Expiry = new DateTime(2008, 12, 28);

JsonSerializer serializer = new JsonSerializer();
serializer.Converters.Add(new JavaScriptDateTimeConverter());
serializer.NullValueHandling = NullValueHandling.Ignore;

using (StreamWriter sw = new StreamWriter(@"c:\json.txt"))
using (JsonWriter writer = new JsonTextWriter(sw))
{
  serializer.Serialize(writer, product);
  // {"Expiry":new Date(1230375600000),"Price":0}
}

JsonSerializer has a number of properties on it to customize how it serializes JSON. These can also be used with the methods on JsonConvert via the JsonSerializerSettings overloads.

ReferenceLoopHandling

Controls how circular referencing objects are serialized. Error, ignore or serialize.

MissingMemberHandling

Controls how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. Ignore or error.

NullValueHandling

Controls how null values are handled during serialization and deserialization. Include or ignore.

DefaultValueHandling

Controls whether a value will be written to JSON or not if it matches the value specified in the member's DefaultValueAttribute. Include or ignore.

ObjectCreationHandling

Controls how objects are created during deserialization. Auto, reuse, replace.

TypeNameHandling

Controls whether .NET type names are included in serialized JSON and read during deserialization when creating objects. None, Objects, Arrays or All.

ConstructorHandling

Controls how constructors are used when initializing objects during deserialization. Default or AllowNonPublicDefaultConstructor.

Converters

A collection of JsonConverters that will be used during serialization and deserialization.

JsonConverters

JsonConverters allows JSON to be manually written during serialization and read during deserialization. This is useful for particularly complex JSON structures or for when you want to change how a type is serialized.

To create your own custom converter inherit from the JsonConverter class. Json.NET also comes with a number of JsonConverters:

DateTime JSON Converters

Json.NET comes with a number of JsonConverters for serializing and deserializing DateTimes. Read more about dates and Json.NET here.

XmlNodeConverter

Converts an XmlNode to and from JSON. Note that to convert a JSON object it must have only a single property or you must define a root node name to be inserted when using this converter. This is required because properties are converted into nodes and well formed XML can only have one root node. XmlNodeConverter has an option to insert a root node for you.

BinaryConverter

Converts binary data like the SqlBinary object to JSON. The binary data is written as a string in JSON and is encoded in Base64.

CustomCreationConverter

An abstract JsonConverter for customizing how an object is create during deserialization. Inherit from this class and implement the Create method with your own code to create and return an object. The object will then be populated with JSON values by the serializer.

A possible example of using this converter would be to call out to a dependency injection framework to resolve what object should be created.


Customizing JSON serialization with attributes

Customizing JSON serialization with attributes

Attributes can be used to control how Json.NET serializes and deserializes .NET objects.

  • JsonObjectAttribute - Placed on classes to control how it should be serialized as a JSON object.
  • JsonArrayAttribute - Placed on collections to control how it should be serialized as a JSON array.
  • JsonPropertyAttribute - Placed on fields and properties to control how it should be serialized as a property in a JSON object.
  • JsonConverterAttribute - Placed on either classes or fields and properties to specify which JsonConverter should be used during serialization.

As well as using the built-in Json.NET attributes, Json.NET also looks for the DataContract and DataMember attributes when determining how JSON is to be serialized and deserialized. If both are present the Json.NET serialization attributes take precedence.

[JsonObject(MemberSerialization.OptIn)]
public class Person
{
  // "John Smith"
  [JsonProperty]
  public string Name { get; set; }

  // "2000-12-15T22:11:03"
  [JsonProperty]
  [JsonConverter(typeof(IsoDateTimeConverter))]
  public DateTime BirthDate { get; set; }

  // new Date(976918263055)
  [JsonProperty]
  [JsonConverter(typeof(JavaScriptDateTimeConverter))]
  public DateTime LastModified { get; set; }

  // not serialized
  public string Department { get; set; }
}
JsonObjectAttribute

The MemberSerialization flag on this attribute specifies whether member serialization is opt-in (a member must have the JsonProperty or DataMember attribute to be serialized) or opt-out (everything is serialized by default but can be ignored with the JsonIgnoreAttribute, Json.NET's default behavor).

Json.NET serializes .NET classes that implement IEnumerable as an JSON array populated with the IEnumerable values. Placing the JsonPropertyAttribute overrides this behavor and forces the serializer to serialize the class's fields and properties.

JsonPropertyAttribute

JsonPropertyAttribute has a number of uses:

  • By default the JSON property will have the same name as the .NET property. This attribute allows the name to be customized.
  • Indicates that a property should be serialized when member serialization is set to opt-in.
  • Includes non-public properties in serialization and deserialization.
JsonIgnoreAttribute

Excludes a field or property from serialization.

JsonConverterAttribute

The JsonConverterAttribute specifies which JsonSerializer is used to convert an object.

The attribute can be placed on a class or a member. When placed on a class the JsonConverter specified by the attribute will be the default way of serializing that class. When the attribute is on a field or property then the specified JsonConverter will always be used to serialize that value.

The priority of which JsonConverter is used is member attribute then class attribute and finally any converters passed to the JsonSerializer.

public class MemberConverterClass
{
  public DateTime DefaultConverter { get; set; }
  [JsonConverter(typeof(IsoDateTimeConverter))]
  public DateTime MemberConverter { get; set; }
}

This example shows the JsonConverterAttribute being applied to a property.

DateTime date = Convert.ToDateTime("1970-01-01T00:00:00Z").ToUniversalTime();

MemberConverterClass c = new MemberConverterClass
  {
    DefaultConverter = date,
    MemberConverter = date
  };

string json = JsonConvert.SerializeObject(c, Formatting.Indented);

Console.WriteLine(json);
//{
//  "DefaultConverter": "\/Date(0)\/",
//  "MemberConverter": "1970-01-01T00:00:00Z"
//}


Serializing Dates in JSON

Serializing Dates in JSON

DateTimes in JSON are hard.

The problem comes from the JSON spec itself, there is no literal syntax for dates in JSON. The spec has objects, arrays, strings, integers and floats, but it defines no standard for what a date looks like.

The default format used by Json.NET for dates is the same one used by Microsoft: "\/Date(1198908717056)\/". You can read more about it here.

DateTime JsonConverters

With no standard for dates in JSON, the number of possible different formats when interoping with other systems is endless. Fortunately Json.NET has a solution to deal with reading and writing custom dates: JsonConverters. A JsonConverter is used to override how a type is serialized.

public class LogEntry
{
  public string Details { get; set; }
  public DateTime LogDate { get; set; }
}

[Test]
public void WriteJsonDates()
{
  LogEntry entry = new LogEntry
  {
    LogDate = new DateTime(2009, 2, 15, 0, 0, 0, DateTimeKind.Utc),
    Details = "Application started."
  };

  string defaultJson = JsonConvert.SerializeObject(entry);
  // {"Details":"Application started.","LogDate":"\/Date(1234656000000)\/"}

  string javascriptJson = JsonConvert.SerializeObject(entry, new JavaScriptDateTimeConverter());

  // {"Details":"Application started.","LogDate":new Date(1234656000000)}

  string isoJson = JsonConvert.SerializeObject(entry, new IsoDateTimeConverter());

  // {"Details":"Application started.","LogDate":"2009-02-15T00:00:00Z"}

}

Simply pass the JsonConverter you wish to use to the Json.NET serializer.

JavaScriptDateTimeConverter

The JavaScriptDateTimeConverter class is one of the two DateTime JsonConverters that come with Json.NET. This converter serializes a DateTime as a JavaScript Date object.

new Date(1234656000000)

Technically this is invalid JSON according to the spec but all browsers, and some JSON frameworks including Json.NET, support it.

IsoDateTimeConverter

IsoDateTimeConverter seralizes a DateTime to an ISO 8601 formatted string.

"2009-02-15T00:00:00Z"

The IsoDateTimeConverter class has a property, DateTimeFormat, to further customize the formatted string.

One final thing to note is all date values returned by Json.NET are in UTC time.


Serializing Collections

Serializing Collections

The JsonSerializer has great support for serializing and deserializing collections of objects.

Serializing

To serialize a collection - a generic list, array, dictionary, or your own custom collection - simply call the serializer with the object you want to get JSON for. Json.NET will serialize the collection and all of the values it contains.

Product p1 = new Product
  {
    Name = "Product 1",
    Price = 99.95m,
    ExpiryDate = new DateTime(2000, 12, 29, 0, 0, 0, DateTimeKind.Utc),
  };
Product p2 = new Product
{
  Name = "Product 2",
  Price = 12.50m,
  ExpiryDate = new DateTime(2009, 7, 31, 0, 0, 0, DateTimeKind.Utc),
};

List<Product> products = new List<Product>();
products.Add(p1);
products.Add(p2);

string json = JsonConvert.SerializeObject(products, Formatting.Indented);
//[
//  {
//    "Name": "Product 1",
//    "ExpiryDate": "\/Date(978048000000)\/",
//    "Price": 99.95,
//    "Sizes": null
//  },
//  {
//    "Name": "Product 2",
//    "ExpiryDate": "\/Date(1248998400000)\/",
//    "Price": 12.50,
//    "Sizes": null
//  }
//]

Deserializing

To deserialize JSON into a .NET collection just specify the collection type you want to deserialize to. Json.NET supports a wide range of collection types.

string json = @"[
  {
    ""Name"": ""Product 1"",
    ""ExpiryDate"": ""\/Date(978048000000)\/"",
    ""Price"": 99.95,
    ""Sizes"": null
  },
  {
    ""Name"": ""Product 2"",
    ""ExpiryDate"": ""\/Date(1248998400000)\/"",
    ""Price"": 12.50,
    ""Sizes"": null
  }
]";

List<Product> products = JsonConvert.DeserializeObject<List<Product>>(json);

Console.WriteLine(products.Count);
// 2

Product p1 = products[0];

Console.WriteLine(p1.Name);
// Product 1

Deserializing Dictionaries

Using Json.NET you can also deserialize a JSON object into a .NET generic dictionary. The JSON object's property names and values will be added to the dictionary.

string json = @"{""key1"":""value1"",""key2"":""value2""}";

Dictionary<string, string> values = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);

Console.WriteLine(values.Count);
// 2

Console.WriteLine(values["key1"]);
// value1


Serialization Callbacks

Serialization Callbacks

Json.NET supports serialization callback methods. A callback can be used to manipulate an object before and after its serialization and deserialization by the JsonSerializer.

  • OnSerializing
  • OnSerialized
  • OnDeserializing
  • OnDeserialized

To tell the serializer which methods should be called during the object's serialization lifecycle, decorate a method with the appropraite attribute (OnSerializingAttribute, OnSerializedAttribute, OnDeserializingAttribute, OnDeserializedAttribute).

Example object with serialization callback methods:

public class SerializationEventTestObject
{
  // This member is serialized and deserialized with no change.
  public int Member1 { get; set; }

  // The value of this field is set and reset during and
  // after serialization.
  public string Member2 { get; set; }

  // This field is not serialized. The OnDeserializedAttribute
  // is used to set the member value after serialization.
  [JsonIgnore]
  public string Member3 { get; set; }

  // This field is set to null, but populated after deserialization.
  public string Member4 { get; set; }

  public SerializationEventTestObject()
  {
    Member1 = 11;
    Member2 = "Hello World!";
    Member3 = "This is a nonserialized value";
    Member4 = null;
  }

  [OnSerializing]
  internal void OnSerializingMethod(StreamingContext context)
  {
    Member2 = "This value went into the data file during serialization.";
  }

  [OnSerialized]
  internal void OnSerializedMethod(StreamingContext context)
  {
    Member2 = "This value was reset after serialization.";
  }

  [OnDeserializing]
  internal void OnDeserializingMethod(StreamingContext context)
  {
    Member3 = "This value was set during deserialization";
  }

  [OnDeserialized]
  internal void OnDeserializedMethod(StreamingContext context)
  {
    Member4 = "This value was set after deserialization.";
  }
}

The example object being serialized and deserialized by Json.NET:

SerializationEventTestObject obj = new SerializationEventTestObject();

Console.WriteLine(obj.Member1);
// 11
Console.WriteLine(obj.Member2);
// Hello World!
Console.WriteLine(obj.Member3);
// This is a nonserialized value
Console.WriteLine(obj.Member4);
// null

string json = JsonConvert.SerializeObject(obj, Formatting.Indented);
// {
//   "Member1": 11,
//   "Member2": "This value went into the data file during serialization.",
//   "Member4": null
// }

Console.WriteLine(obj.Member1);
// 11
Console.WriteLine(obj.Member2);
// This value was reset after serialization.
Console.WriteLine(obj.Member3);
// This is a nonserialized value
Console.WriteLine(obj.Member4);
// null

obj = JsonConvert.DeserializeObject<SerializationEventTestObject>(json);

Console.WriteLine(obj.Member1);
// 11
Console.WriteLine(obj.Member2);
// This value went into the data file during serialization.
Console.WriteLine(obj.Member3);
// This value was set during deserialization
Console.WriteLine(obj.Member4);
// This value was set after deserialization.


Serialization Error Handling

Serialization Error Handling

Json.NET supports error handling during serialization and deserialization. Error handling lets you catch an error and choose whether to handle it and continue with serialization or let the error bubble up and be thrown in your application.

Error handling is defined through two methods: the Error event on JsonSerializer and the OnErrorAttribute.

Error Event

The Error event is an event handler found on JsonSerializer. The error event is raised whenever an exception is thrown while serializing or deserialing JSON. Like all settings found on JsonSerializer it can also be set on JsonSerializerSettings and passed to the serialization methods on JsonConvert.

List<string> errors = new List<string>();

List<DateTime> c = JsonConvert.DeserializeObject<List<DateTime>>(@"[
  ""2009-09-09T00:00:00Z"",
  ""I am not a date and will error!"",
  [
    1
  ],
  ""1977-02-20T00:00:00Z"",
  null,
  ""2000-12-01T00:00:00Z""
]",
  new JsonSerializerSettings
    {
      Error = delegate(object sender, ErrorEventArgs args)
        {
          errors.Add(args.ErrorContext.Error.Message);
          args.ErrorContext.Handled = true;
        },
      Converters = { new IsoDateTimeConverter() }
    });

// 2009-09-09T00:00:00Z
// 1977-02-20T00:00:00Z
// 2000-12-01T00:00:00Z

// The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.
// Unexpected token parsing date. Expected String, got StartArray.
// Cannot convert null value to System.DateTime.

In this example we are deserializing a JSON array to a collection of DateTimes. On the JsonSerializerSettings a handler has been assigned to the Error event which will log the error message and mark the error as handled.

The result of deserializing the JSON is three successfully deserialized dates and three error messages: one for the badly formatted string, "I am not a date and will error!", one for the nested JSON array and one for the null value since the list doesn't allow nullable DateTimes. The event handler has logged these messages and Json.NET has continued on deserializing the JSON because the errors were marked as handled.

One thing to note with error handling in Json.NET is that an unhandled error will bubble up and raise the event on each of its parents, e.g. an unhandled error when serializing a collection of objects will be raised twice, once against the object and then again on the collection. This will let you handle an error either where it occurred or on one of its parents.

JsonSerializer serializer = new JsonSerializer();
serializer.Error += delegate(object sender, ErrorEventArgs args)
  {
    // only log an error once
    if (args.CurrentObject == args.ErrorContext.OriginalObject)
      errors.Add(args.ErrorContext.Error.Message);
  };

If you aren't immediately handling an error and only want to perform an action against it once then you can check to see whether the ErrorEventArg's CurrentObject is equal to the OriginalObject. OriginalObject is the object that threw the error and CurrentObject is the object that the event is being raised against. They will only equal the first time the event is raised against the OriginalObject.

OnErrorAttribute

The OnErrorAttribute works much like the other .NET serialization attributes that Json.NET supports. To use it you simply place the attribute on a method which takes the correct parameters: a StreamingContext and a ErrorContext. The name of the method doesn't matter.

public class PersonError
{
  private List<string> _roles;

  public string Name { get; set; }
  public int Age { get; set; }
  public List<string> Roles
  {
    get
    {
      if (_roles == null)
        throw new Exception("Roles not loaded!");

      return _roles;
    }
    set { _roles = value; }
  }
  public string Title { get; set; }

  [OnError]
  internal void OnError(StreamingContext context, ErrorContext errorContext)
  {
    errorContext.Handled = true;
  }
}

In this example accessing the the Roles property will throw an exception when no roles have been set. The HandleError method will set the error when serializing Roles as handled and allow Json.NET to continue serializing the class.

PersonError person = new PersonError
  {
    Name = "George Michael Bluth",
    Age = 16,
    Roles = null,
    Title = "Mister Manager"
  };

string json = JsonConvert.SerializeObject(person, Formatting.Indented);

Console.WriteLine(json);
//{
//  "Name": "George Michael Bluth",
//  "Age": 16,
//  "Title": "Mister Manager"
//}


Serialization and Preserving Object References

Serialization and Preserving Object References

By default Json.NET will serialize all objects it encounters by value. If a list contains two Person references, and both references point to the same object then the JsonSerializer will write out all the names and values for each reference.

Person p = new Person
  {
    BirthDate = new DateTime(1980, 12, 23, 0, 0, 0, DateTimeKind.Utc),
    LastModified = new DateTime(2009, 2, 20, 12, 59, 21, DateTimeKind.Utc),
    Name = "James"
  };

List<Person> people = new List<Person>();
people.Add(p);
people.Add(p);

string json = JsonConvert.SerializeObject(people, Formatting.Indented);
//[
//  {
//    "Name": "James",
//    "BirthDate": "\/Date(346377600000)\/",
//    "LastModified": "\/Date(1235134761000)\/"
//  },
//  {
//    "Name": "James",
//    "BirthDate": "\/Date(346377600000)\/",
//    "LastModified": "\/Date(1235134761000)\/"
//  }
//]

In most cases this is the desired result but in certain scenarios writing the second item in the list as a reference to the first is a better solution. If the above JSON was deserialized now then the returned list would contain two completely separate Person objects with the same values. Writing references by value will also cause problems on objects where a circular reference occurs.

PreserveReferencesHandling

Settings PreserveReferencesHandling will track object references when serializing and deserializing JSON.

string json = JsonConvert.SerializeObject(people, Formatting.Indented,
  new JsonSerializerSettings { PreserveReferencesHandling = PreserveReferencesHandling.Objects });
//[
//  {
//    "$id": "1",
//    "Name": "James",
//    "BirthDate": "\/Date(346377600000)\/",
//    "LastModified": "\/Date(1235134761000)\/"
//  },
//  {
//    "$ref": "1"
//  }
//]

List<Person> deserializedPeople = JsonConvert.DeserializeObject<List<Person>>(json,
  new JsonSerializerSettings { PreserveReferencesHandling = PreserveReferencesHandling.Objects });

Console.WriteLine(deserializedPeople.Count);
// 2

Person p1 = deserializedPeople[0];
Person p2 = deserializedPeople[1];

Console.WriteLine(p1.Name);
// James
Console.WriteLine(p2.Name);
// James

bool equal = Object.ReferenceEquals(p1, p2);
// true

The first Person in the list is serizlied with the addition of an object Id. The second Person in JSON is now only a reference to the first.

With PreserveReferencesHandling on now only one Person object is created on deserialization and the list contains two references to it, mirroring what we started with.

IsReference on JsonObjectAttribute, JsonArrayAttribute and JsonPropertyAttribute

The PreserveReferencesHandling setting on the JsonSerializer will change how all objects are serialized and deserialized. For fine grain control over which objects and members should be serialized as a reference there is the IsReference property on the JsonObjectAttribute, JsonArrayAttribute and JsonPropertyAttribute.

Setting IsReference on JsonObjectAttribute or JsonArrayAttribute to true will mean the JsonSerializer will always serialize the type the attribute is against as a reference. Setting IsReference on the JsonPropertyAttribute to true will serialize only that property as a reference.

[JsonObject(IsReference = true)]
public class EmployeeReference
{
  public string Name { get; set; }
  public EmployeeReference Manager { get; set; }
}

IReferenceResolver

To customize how references are generated and resolved the IReferenceResolver interface is available to inherit from and use with the JsonSerializer.


CustomCreationConverter

CustomCreationConverter

The CustomCreationConverter is a JsonConverter that provides a way to customize how an object is created during JSON deserialization. Once the object has been created it will then have values populated onto it by the serializer.

public interface IPerson
{
  string FirstName { get; set; }
  string LastName { get; set; }
  DateTime BirthDate { get; set; }
}

public class Employee : IPerson
{
  public string FirstName { get; set; }
  public string LastName { get; set; }
  public DateTime BirthDate { get; set; }

  public string Department { get; set; }
  public string JobTitle { get; set; }
}

public class PersonConverter : CustomCreationConverter<IPerson>
{
  public override IPerson Create(Type objectType)
  {
    return new Employee();
  }
}

This is an extremely simple example. A more complicated scenario could involve an object factory or service locator which resolves the object at runtime.

//[
//  {
//    "FirstName": "Maurice",
//    "LastName": "Moss",
//    "BirthDate": "\/Date(252291661000)\/",
//    "Department": "IT",
//    "JobTitle": "Support"
//  },
//  {
//    "FirstName": "Jen",
//    "LastName": "Barber",
//    "BirthDate": "\/Date(258771661000)\/",
//    "Department": "IT",
//    "JobTitle": "Manager"
//  }
//]

List<IPerson> people = JsonConvert.DeserializeObject<List<IPerson>>(json, new PersonConverter());

IPerson person = people[0];

Console.WriteLine(person.GetType());
// Newtonsoft.Json.Tests.Employee

Console.WriteLine(person.FirstName);
// Maurice

Employee employee = (Employee)person;

Console.WriteLine(employee.JobTitle);
// Support


Contract Resolver

Contract Resolvers

The IContractResolver interface provides a way to customize how the JsonSerializer serializes and deserializes .NET objects to JSON.

Implementing the IContractResolver interface and then assigning an instance to a JsonSerializer lets you control whether the object is serialized as a JSON object or JSON array, what object members should be serialized, how they are serialized and what they are called.

DefaultContractResolver

The DefaultContractResolver is the default resolver used by the serializer. It provides many avenues of extensibility in the form of virtual methods that can be overriden.

CamelCasePropertyNamesContractResolver

CamelCasePropertyNamesContractResolver inherits from DefaultContractResolver and simply overrides the JSON property name to be written in camelcase.

Product product = new Product
                    {
                      ExpiryDate = new DateTime(2010, 12, 20, 18, 1, 0, DateTimeKind.Utc),
                      Name = "Widget",
                      Price = 9.99m,
                      Sizes = new[] {"Small", "Medium", "Large"}
                    };

string json =
  JsonConvert.SerializeObject(
    product,
    Formatting.Indented,
    new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }
  );

//{
//  "name": "Widget",
//  "expiryDate": "\/Date(1292868060000)\/",
//  "price": 9.99,
//  "sizes": [
//    "Small",
//    "Medium",
//    "Large"
//  ]
//}


Reducing Serialized JSON Size

Reducing Serialized JSON Size

One of the common problems encountered when serializing .NET objects to JSON is that the JSON ends up containing a lot of unwanted properties and values. This can be especially important when returning JSON to the client. More JSON means more bandwidth and a slower website.

To solve the issue of unwanted JSON Json.NET has a range of built in options to fine tune what gets written from a serialized object.

JsonIgnoreAttribute and DataMemberAttribute

By default Json.NET will include all of a classes public properties and fields in the JSON it creates. Adding the JsonIgnoreAttribute to a property tells the serializer to always skip writing it to the JSON result.

public class Car
{
  // included in JSON
  public string Model { get; set; }
  public DateTime Year { get; set; }
  public List<string> Features { get; set; }

  // ignored
  [JsonIgnore]
  public DateTime LastModified { get; set; }
}

If a class has many properties and you only want to serialize a small subset of them then adding JsonIgnore to all the others will be tedious and error prone. The way to tackle this scenario is to add the DataContractAttribute to the class and DataMemberAttributes to the properties to serialize. This is opt-in serialization, only the properties you mark up with be serialized, compared to opt-out serialization using JsonIgnoreAttribute.

[DataContract]
public class Computer
{
  // included in JSON
  [DataMember]
  public string Name { get; set; }
  [DataMember]
  public decimal SalePrice { get; set; }

  // ignored
  public string Manufacture { get; set; }
  public int StockCount { get; set; }
  public decimal WholeSalePrice { get; set; }
  public DateTime NextShipmentDate { get; set; }
}

Formatting

JSON written by the serializer with an option of Formatting.Indented produces nicely formatted, easy to read JSON – great when you are developing. Formatting.None on the other hand keeps the JSON result small, skipping all unnecessary spaces and line breaks to produce the most compact and efficient JSON possible.

NullValueHandling

NullValueHandling is an option on the JsonSerializer and controls how the serializer handles properties with a null value. By setting a value of NullValueHandling.Ignore the JsonSerializer skips writing any properties that have a value of null.

public class Movie
{
  public string Name { get; set; }
  public string Description { get; set; }
  public string Classification { get; set; }
  public string Studio { get; set; }
  public DateTime? ReleaseDate { get; set; }
  public List<string> ReleaseCountries { get; set; }
}
Movie movie = new Movie();
movie.Name = "Bad Boys III";
movie.Description = "It's no Bad Boys";

string included = JsonConvert.SerializeObject(movie,
  Formatting.Indented,
  new JsonSerializerSettings { });

// {
//   "Name": "Bad Boys III",
//   "Description": "It's no Bad Boys",
//   "Classification": null,
//   "Studio": null,
//   "ReleaseDate": null,
//   "ReleaseCountries": null
// }

string ignored = JsonConvert.SerializeObject(movie,
  Formatting.Indented,
  new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });

// {
//   "Name": "Bad Boys III",
//   "Description": "It's no Bad Boys"
// }

NullValueHandling can also be customized on individual properties using the a JsonPropertyAttribute. The JsonPropertyAttribute value of NullValueHandling will override the setting on the JsonSerializer for that property.

DefaultValueHandling

DefaultValueHandling is an option on the JsonSerializer and controls how the serializer handles properties with a default value. Setting a value of DefaultValueHandling.Ignore will make the JsonSerializer skip writing any properties that have a default value to the JSON result. For object references this will be null. For value types like int and DateTime the serializer will skip the default unitialized value for that value type.

Json.NET also allows you to customize what the default value of an individual property is using the DefaultValueAttribute. For example if a string property called Department always returns an empty string in its default state and you didn't want that empty string in your JSON then placing the DefaultValueAttribute on Department with that value will mean Department is no longer written to JSON unless it has a value.

public class Invoice
{
  public string Company { get; set; }
  public decimal Amount { get; set; }

  // false is default value of bool
  public bool Paid { get; set; }
  // null is default value of nullable
  public DateTime? PaidDate { get; set; }

  // customize default values
  [DefaultValue(30)]
  public int FollowUpDays { get; set; }
  [DefaultValue("")]
  public string FollowUpEmailAddress { get; set; }
}
Invoice invoice = new Invoice
{
  Company = "Acme Ltd.",
  Amount = 50.0m,
  Paid = false,
  FollowUpDays = 30,
  FollowUpEmailAddress = string.Empty,
  PaidDate = null
};

string included = JsonConvert.SerializeObject(invoice,
  Formatting.Indented,
  new JsonSerializerSettings { });

// {
//   "Company": "Acme Ltd.",
//   "Amount": 50.0,
//   "Paid": false,
//   "PaidDate": null,
//   "FollowUpDays": 30,
//   "FollowUpEmailAddress": ""
// }

string ignored = JsonConvert.SerializeObject(invoice,
  Formatting.Indented,
  new JsonSerializerSettings { DefaultValueHandling = DefaultValueHandling.Ignore });

// {
//   "Company": "Acme Ltd.",
//   "Amount": 50.0
// }

DefaultValueHandling can also be customized on individual properties using the a JsonPropertyAttribute. The JsonPropertyAttribute value of DefaultValueHandling will override the setting on the JsonSerializer for that property.

IContractResolver

For more flexibility the IContractResolver provides an interface to customize almost every aspect of how a .NET object gets serialized to JSON, including changing serialization behavior at runtime.

public class DynamicContractResolver : DefaultContractResolver
{
  private readonly char _startingWithChar;
  public DynamicContractResolver(char startingWithChar)
  {
    _startingWithChar = startingWithChar;
  }

  protected override IList<JsonProperty> CreateProperties(JsonObjectContract contract)
  {
    IList<JsonProperty> properties = base.CreateProperties(contract);

    // only serializer properties that start with the specified character
    properties =
      properties.Where(p => p.PropertyName.StartsWith(_startingWithChar.ToString())).ToList();

    return properties;
  }
}

public class Book
{
  public string BookName { get; set; }
  public decimal BookPrice { get; set; }
  public string AuthorName { get; set; }
  public int AuthorAge { get; set; }
  public string AuthorCountry { get; set; }
}
Book book = new Book
              {
                BookName = "The Gathering Storm",
                BookPrice = 16.19m,
                AuthorName = "Brandon Sanderson",
                AuthorAge = 34,
                AuthorCountry = "United States of America"
              };

string startingWithA = JsonConvert.SerializeObject(book, Formatting.Indented,
  new JsonSerializerSettings { ContractResolver = new DynamicContractResolver('A') });

// {
//   "AuthorName": "Brandon Sanderson",
//   "AuthorAge": 34,
//   "AuthorCountry": "United States of America"
// }

string startingWithB = JsonConvert.SerializeObject(book, Formatting.Indented,
  new JsonSerializerSettings { ContractResolver = new DynamicContractResolver('B') });

// {
//   "BookName": "The Gathering Storm",
//   "BookPrice": 16.19
// }


Serializing Partial JSON Fragments

Serializing Partial JSON Fragments

Often when working with large JSON documents you're only interested in a small fragment of information. This scenario can be annoying when you want to serialize that Json.NET into .NET objects because you have to define .NET classes for the entire JSON result.

With Json.NET it is easy to get around this problem. Using LINQ to JSON you can extract the pieces of JSON you want to serialize before passing them to the Json.NET serializer.

public class SearchResult
{
  public string Title { get; set; }
  public string Content { get; set; }
  public string Url { get; set; }
}
string googleSearchText = @"{
  ""responseData"": {
    ""results"": [
      {
        ""GsearchResultClass"": ""GwebSearch"",
        ""unescapedUrl"": ""http://en.wikipedia.org/wiki/Paris_Hilton"",
        ""url"": ""http://en.wikipedia.org/wiki/Paris_Hilton"",
        ""visibleUrl"": ""en.wikipedia.org"",
        ""cacheUrl"": ""http://www.google.com/search?q=cache:TwrPfhd22hYJ:en.wikipedia.org"",
        ""title"": ""<b>Paris Hilton</b> - Wikipedia, the free encyclopedia"",
        ""titleNoFormatting"": ""Paris Hilton - Wikipedia, the free encyclopedia"",
        ""content"": ""[1] In 2006, she released her debut album...""
      },
      {
        ""GsearchResultClass"": ""GwebSearch"",
        ""unescapedUrl"": ""http://www.imdb.com/name/nm0385296/"",
        ""url"": ""http://www.imdb.com/name/nm0385296/"",
        ""visibleUrl"": ""www.imdb.com"",
        ""cacheUrl"": ""http://www.google.com/search?q=cache:1i34KkqnsooJ:www.imdb.com"",
        ""title"": ""<b>Paris Hilton</b>"",
        ""titleNoFormatting"": ""Paris Hilton"",
        ""content"": ""Self: Zoolander. Socialite <b>Paris Hilton</b>...""
      }
    ],
    ""cursor"": {
      ""pages"": [
        {
          ""start"": ""0"",
          ""label"": 1
        },
        {
          ""start"": ""4"",
          ""label"": 2
        },
        {
          ""start"": ""8"",
          ""label"": 3
        },
        {
          ""start"": ""12"",
          ""label"": 4
        }
      ],
      ""estimatedResultCount"": ""59600000"",
      ""currentPageIndex"": 0,
      ""moreResultsUrl"": ""http://www.google.com/search?oe=utf8&ie=utf8...""
    }
  },
  ""responseDetails"": null,
  ""responseStatus"": 200
}";

JObject googleSearch = JObject.Parse(googleSearchText);

// get JSON result objects into a list
IList<JToken> results = googleSearch["responseData"]["results"].Children().ToList();

// serialize JSON results into .NET objects
IList<SearchResult> searchResults = new List<SearchResult>();
foreach (JToken result in results)
{
  SearchResult searchResult = JsonConvert.DeserializeObject<SearchResult>(result.ToString());
  searchResults.Add(searchResult);
}

// Title = <b>Paris Hilton</b> - Wikipedia, the free encyclopedia
// Content = [1] In 2006, she released her debut album...
// Url = http://en.wikipedia.org/wiki/Paris_Hilton

// Title = <b>Paris Hilton</b>
// Content = Self: Zoolander. Socialite <b>Paris Hilton</b>...
// Url = http://www.imdb.com/name/nm0385296/


LINQ to JSON

LINQ to JSON

LINQ to JSON is a programming API for working with JSON objects. The API has been designed with LINQ in mind to enable to quick querying and creation of JSON objects. LINQ to JSON sits under the Newtonsoft.Json.Linq namespace.

Creating JSON

There are a number of different options when it comes to creating JSON using LINQ to JSON. The first to create objects imperatively. You have total control but it is more verbose than other options.

JArray array = new JArray();
JValue text = new JValue("Manual text");
JValue date = new JValue(new DateTime(2000, 5, 23));

array.Add(text);
array.Add(date);

string json = array.ToString();
// [
//   "Manual text",
//   "\/Date(958996800000+1200)\/"
// ]

Another option is to create JSON objects declaratively.

List<Post> posts = GetPosts();

JObject rss =
  new JObject(
    new JProperty("channel",
      new JObject(
        new JProperty("title", "James Newton-King"),
        new JProperty("link", "http://james.newtonking.com"),
        new JProperty("description", "James Newton-King's blog."),
        new JProperty("item",
          new JArray(
            from p in posts
            orderby p.Title
            select new JObject(
              new JProperty("title", p.Title),
              new JProperty("description", p.Description),
              new JProperty("link", p.Link),
              new JProperty("category",
                new JArray(
                  from c in p.Categories
                  select new JValue(c)))))))));

Console.WriteLine(rss.ToString());

//{
//  "channel": {
//    "title": "James Newton-King",
//    "link": "http://james.newtonking.com",
//    "description": "James Newton-King's blog.",
//    "item": [
//      {
//        "title": "Json.NET 1.3 + New license + Now on CodePlex",
//        "description": "Annoucing the release of Json.NET 1.3, the MIT license and the source being available on CodePlex",
//        "link": "http://james.newtonking.com/projects/json-net.aspx",
//        "category": [
//          "Json.NET",
//          "CodePlex"
//        ]
//      },
//      {
//        "title": "LINQ to JSON beta",
//        "description": "Annoucing LINQ to JSON",
//        "link": "http://james.newtonking.com/projects/json-net.aspx",
//        "category": [
//          "Json.NET",
//          "LINQ"
//        ]
//      }
//    ]
//  }
//}

You can create a JSON object from a non-JSON type using the FromObject method.

JObject o = JObject.FromObject(new
{
  channel = new
  {
    title = "James Newton-King",
    link = "http://james.newtonking.com",
    description = "James Newton-King's blog.",
    item =
        from p in posts
        orderby p.Title
        select new
        {
          title = p.Title,
          description = p.Description,
          link = p.Link,
          category = p.Categories
        }
  }
});

Finally JSON objects can be created from a string use the Parse method.

string json = @"{
  CPU: 'Intel',
  Drives: [
    'DVD read/writer',
    ""500 gigabyte hard drive""
  ]
}";

JObject o = JObject.Parse(json);

Querying JSON

The properties methods that are the most useful when querying JSON objects are the Children method and the property index.

Children returns all the children of that object. If it is a JObject it will return a collection of properties to work with and if it is a JArray you will get a collection of the array's values.

The property index is used to get a specific child, either by index position for JSON arrays or property name for JSON objects.

var postTitles =
  from p in rss["channel"]["item"].Children()
  select (string)p["title"];

foreach (var item in postTitles)
{
  Console.WriteLine(item);
}

//LINQ to JSON beta
//Json.NET 1.3 + New license + Now on CodePlex

var categories =
  from c in rss["channel"]["item"].Children()["category"].Values<string>()
  group c by c into g
  orderby g.Count() descending
  select new { Category = g.Key, Count = g.Count() };

foreach (var c in categories)
{
  Console.WriteLine(c.Category + " - Count: " + c.Count);
}

//Json.NET - Count: 2
//LINQ - Count: 1
//CodePlex - Count: 1

LINQ to JSON can also be used to manually convert from JSON to a .NET object.

public class Shortie
{
  public string Original { get; set; }
  public string Shortened { get; set; }
  public string Short { get; set; }
  public ShortieException Error { get; set; }
}

public class ShortieException
{
  public int Code { get; set; }
  public string ErrorMessage { get; set; }
}

Manually serializing and deserializing between .NET objects is most useful when working with JSON that doesn't closely match your .NET objects.

string jsonText = @"{
  ""short"":{
    ""original"":""http://www.foo.com/"",
    ""short"":""krehqk"",
    ""error"":{
      ""code"":0,
      ""msg"":""No action taken""}
}";

JObject json = JObject.Parse(jsonText);

Shortie shortie = new Shortie
                  {
                    Original = (string)json["short"]["original"],
                    Short = (string)json["short"]["short"],
                    Error = new ShortieException
                            {
                              Code = (int)json["short"]["error"]["code"],
                              ErrorMessage = (string)json["short"]["error"]["msg"]
                            }
                  };

Console.WriteLine(shortie.Original);
// http://www.foo.com/

Console.WriteLine(shortie.Error.ErrorMessage);
// No action taken


Querying LINQ to JSON with SelectToken

Querying LINQ to JSON with SelectToken

SelectToken provides a method to query LINQ to JSON using a single string path to a desired JToken. SelectToken makes dynamic queries easy because the entire query is defined in a string.

string name = (string)o.SelectToken("Manufacturers[0].Name");

SelectToken

SelectToken is a method on JToken and takes a string path to a child token. SelectToken returns the child token or a null reference if a token couldn't be found at the path's location.

The path is made up of property names and array indexes separated by periods. Array indexes can use either square or round brackets. Both of the following are valid paths and are equivalent to each other: Manufacturers[0].Name and Manufacturers(0).Name.

JObject o = JObject.Parse(@"{
  ""Stores"": [
    ""Lambton Quay"",
    ""Willis Street""
  ],
  ""Manufacturers"": [
    {
      ""Name"": ""Acme Co"",
      ""Products"": [
        {
          ""Name"": ""Anvil"",
          ""Price"": 50
        }
      ]
    },
    {
      ""Name"": ""Contoso"",
      ""Products"": [
        {
          ""Name"": ""Elbow Grease"",
          ""Price"": 99.95
        },
        {
          ""Name"": ""Headlight Fluid"",
          ""Price"": 4
        }
      ]
    }
  ]
}");

string name = (string)o.SelectToken("Manufacturers[0].Name");
// Acme Co

decimal productPrice = (decimal)o.SelectToken("Manufacturers[0].Products[0].Price");
// 50

string productName = (string)o.SelectToken("Manufacturers[1].Products[0].Name");
// Elbow Grease

SelectToken with LINQ

SelectToken can be used in combination with standard LINQ methods.

IList<string> storeNames = o.SelectToken("Stores").Select(s => (string)s).ToList();
// Lambton Quay
// Willis Street

IList<string> firstProductNames = o["Manufacturers"].Select(m => (string)m.SelectToken("Products[1].Name")).ToList();
// null
// Headlight Fluid

decimal totalPrice = o["Manufacturers"].Sum(m => (decimal)m.SelectToken("Products[0].Price"));
// 149.95


Reading and Writing JSON

Reading and Writing JSON

To manually read and write JSON Json.NET provides the JsonReader and JsonWriter classes.

JsonTextReader and JsonTextWriter

JsonTextReader and JsonTextWriter are used to read and write JSON text. The JsonTextWriter has a number of settings on it to control how JSON is formatted when it is written. These options include formatting, indention character, indent count and quote character.

StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);

using (JsonWriter jsonWriter = new JsonTextWriter(sw))
{
  jsonWriter.Formatting = Formatting.Indented;

  jsonWriter.WriteStartObject();
  jsonWriter.WritePropertyName("CPU");
  jsonWriter.WriteValue("Intel");
  jsonWriter.WritePropertyName("PSU");
  jsonWriter.WriteValue("500W");
  jsonWriter.WritePropertyName("Drives");
  jsonWriter.WriteStartArray();
  jsonWriter.WriteValue("DVD read/writer");
  jsonWriter.WriteComment("(broken)");
  jsonWriter.WriteValue("500 gigabyte hard drive");
  jsonWriter.WriteValue("200 gigabype hard drive");
  jsonWriter.WriteEnd();
  jsonWriter.WriteEndObject();
}

// {
//   "CPU": "Intel",
//   "PSU": "500W",
//   "Drives": [
//     "DVD read/writer"
//     /*(broken)*/,
//     "500 gigabyte hard drive",
//     "200 gigabype hard drive"
//   ]
// }

JTokenReader and JTokenWriter

JTokenReader and JTokenWriter read and write LINQ to JSON objects. They are located in the Newtonsoft.Json.Linq namespace. These objects allow you to use LINQ to JSON objects with objects that read and write JSON such as the JsonSerializer. For example you can deserialize from a LINQ to JSON object into a regular .NET object and vice versa.

JObject o = new JObject(
  new JProperty("Name", "John Smith"),
  new JProperty("BirthDate", new DateTime(1983, 3, 20))
  );

JsonSerializer serializer = new JsonSerializer();
Person p = (Person)serializer.Deserialize(new JTokenReader(o), typeof(Person));

Console.WriteLine(p.Name);
// John Smith


Converting between JSON and XML

Converting between JSON and XML

Json.NET supports converting JSON to XML and vice versa using the XmlNodeConverter.

Elements, attributes, text, comments, character data, processing instructions, namespaces and the XML declaration are all preserved when converting between the two. The only caveat is that it is possible to lose the order of differently named nodes at the same level when they are grouped together into an array.

Conversion Rules

  • Elements remain unchanged.
  • Attributes are prefixed with an @.
  • Single child text nodes are a value directly against an element, otherwise they are accessed via #text.
  • The XML declaration and processing instructions are prefixed with ?.
  • Charater data, comments, whitespace and significate whitespace nodes are accessed via #cdata-section, #comment, #whitespace and #significate-whitespace respectively.
  • Multiple nodes with the same name at the same level are grouped together into an array.
  • Empty elements are null.

SerializeXmlNode

The JsonConvert has two helper methods for converting between JSON and XML. The first is SerializeXmlNode. This method takes an XmlNode and serializes it to JSON text.

string xml = @"<?xml version=""1.0"" standalone=""no""?>
<root>
  <person id=""1"">
  <name>Alan</name>
  <url>http://www.google.com</url>
  </person>
  <person id=""2"">
  <name>Louis</name>
  <url>http://www.yahoo.com</url>
  </person>
</root>";

XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);

string jsonText = JsonConvert.SerializeXmlNode(doc);
//{
//  "?xml": {
//    "@version": "1.0",
//    "@standalone": "no"
//  },
//  "root": {
//    "person": [
//      {
//        "@id": "1",
//        "name": "Alan",
//        "url": "http://www.google.com"
//      },
//      {
//        "@id": "2",
//        "name": "Louis",
//        "url": "http://www.yahoo.com"
//      }
//    ]
//  }
//}

DeserializeXmlNode

The second helper method on JsonConvert is DeserializeXmlNode. This method takes JSON text and deserializes it into a XmlNode.

Because valid XML must have one root element the JSON passed to DeserializeXmlNode should have one property in the root JSON object. If the root JSON object has multiple properties then the overload that also takes an element name should be used. A root element with that name will be inserted into the deserialized XmlNode.

string json = @"{
  ""?xml"": {
    ""@version"": ""1.0"",
    ""@standalone"": ""no""
  },
  ""root"": {
    ""person"": [
      {
        ""@id"": ""1"",
        ""name"": ""Alan"",
        ""url"": ""http://www.google.com""
      },
      {
        ""@id"": ""2"",
        ""name"": ""Louis"",
        ""url"": ""http://www.yahoo.com""
      }
    ]
  }
}";

XmlDocument doc = (XmlDocument)JsonConvert.DeserializeXmlNode(json);
// <?xml version="1.0" standalone="no"?>
// <root>
//   <person id="1">
//   <name>Alan</name>
//   <url>http://www.google.com</url>
//   </person>
//   <person id="2">
//   <name>Louis</name>
//   <url>http://www.yahoo.com</url>
//   </person>
// </root>


Newtonsoft.Json Namespace

Newtonsoft.Json Namespace
Namespaces ► Newtonsoft.Json
The Newtonsoft.Json namespace provides classes that are used to implement the core services of the framework.
Declaration Syntax
C# Visual Basic Visual C++
namespace Newtonsoft.Json
Namespace Newtonsoft.Json
namespace Newtonsoft.Json
Types
All Types Classes Interfaces Enumerations
Icon | Type | Description
 | ConstructorHandling | Specifies how constructors are used when initializing objects during deserialization by the JsonSerializer.
 | DefaultValueHandling | Specifies default value handling options for the JsonSerializer.
 | Formatting | Specifies formatting options for the JsonTextWriter.
 | IJsonLineInfo | Provides an interface to enable a class to return line and position information.
 | JsonArrayAttribute | Instructs the JsonSerializer how to serialize the collection.
 | JsonConstructorAttribute | Instructs the JsonSerializer not to serialize the public field or public read/write property value.
 | JsonContainerAttribute | Instructs the JsonSerializer how to serialize the object.
 | JsonConvert | Provides methods for converting between common language runtime types and JSON types.
 | JsonConverter | Converts an object to and from JSON.
 | JsonConverterAttribute | Instructs the JsonSerializer to use the specified JsonConverter when serializing the member or class.
 | JsonConverterCollection | Represents a collection of JsonConverter.
 | JsonIgnoreAttribute | Instructs the JsonSerializer not to serialize the public field or public read/write property value.
 | JsonObjectAttribute | Instructs the JsonSerializer how to serialize the object.
 | JsonPropertyAttribute | Instructs the JsonSerializer to always serialize the member with the specified name.
 | JsonReader | Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
 | JsonReaderException | The exception thrown when an error occurs while reading Json text.
 | JsonSerializationException | The exception thrown when an error occurs during Json serialization or deserialization.
 | JsonSerializer | Serializes and deserializes objects into and from the JSON format. The JsonSerializer enables you to control how objects are encoded into JSON.
 | JsonSerializerSettings | Specifies the settings on a JsonSerializer object.
 | JsonTextReader | Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
 | JsonTextWriter | Represents a writer that provides a fast, non-cached, forward-only way of generating Json data.
 | JsonToken | Specifies the type of Json token.
 | JsonValidatingReader | Represents a reader that provides JsonSchema validation.
 | JsonWriter | Represents a writer that provides a fast, non-cached, forward-only way of generating Json data.
 | JsonWriterException | The exception thrown when an error occurs while reading Json text.
 | MemberSerialization | Specifies the member serialization options for the JsonSerializer.
 | MissingMemberHandling | Specifies missing member handling options for the JsonSerializer.
 | NullValueHandling | Specifies null value handling options for the JsonSerializer.
 | ObjectCreationHandling | Specifies how object creation is handled by the JsonSerializer.
 | PreserveReferencesHandling | Specifies reference handling options for the JsonSerializer.
 | ReferenceLoopHandling | Specifies reference loop handling options for the JsonSerializer.
 | Required | Indicating whether a property is required.
 | JsonReader..::..State | Specifies the state of the reader.
 | TypeNameHandling | Specifies type name handling options for the JsonSerializer.
 | WriteState | Specifies the state of the JsonWriter.


ConstructorHandling Enumeration

ConstructorHandling Enumeration
Namespaces ► Newtonsoft.Json ► ConstructorHandling
Specifies how constructors are used when initializing objects during deserialization by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public enum ConstructorHandling
Public Enumeration ConstructorHandling
public enum class ConstructorHandling
Members
Member | Description
Default | First attempt to use the public default constructor then fall back to single paramatized constructor.
AllowNonPublicDefaultConstructor | Allow Json.NET to use a non-public default constructor.

Assembly: Newtonsoft.Json (Module: Newtonsoft.Json) Version: 4.0.2.0 (4.0.2.13623)


DefaultValueHandling Enumeration

DefaultValueHandling Enumeration
Namespaces ► Newtonsoft.Json ► DefaultValueHandling
Specifies default value handling options for the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public enum DefaultValueHandling
Public Enumeration DefaultValueHandling
public enum class DefaultValueHandling
Members
Member | Description
Include | Include default values when serializing and deserializing objects.
Ignore | Ignore default values when serializing and deserializing objects.


Formatting Enumeration

Formatting Enumeration
Namespaces ► Newtonsoft.Json ► Formatting
Specifies formatting options for the JsonTextWriter.
Declaration Syntax
C# Visual Basic Visual C++
public enum Formatting
Public Enumeration Formatting
public enum class Formatting
Members
Member | Description
None | No special formatting is applied. This is the default.
Indented | Causes child objects to be indented according to the Indentation and IndentChar settings.


IJsonLineInfo Interface

IJsonLineInfo Interface
Namespaces ► Newtonsoft.Json ► IJsonLineInfo
Provides an interface to enable a class to return line and position information.
Declaration Syntax
C# Visual Basic Visual C++
public interface IJsonLineInfo
Public Interface IJsonLineInfo
public interface class IJsonLineInfo
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | HasLineInfo()()()() | Gets a value indicating whether the class can return line information.
 | LineNumber | Gets the current line number.
 | LinePosition | Gets the current line position.


HasLineInfo Method

HasLineInfo Method
Namespaces ► Newtonsoft.Json ► IJsonLineInfo ► HasLineInfo()()()()
Gets a value indicating whether the class can return line information.
Declaration Syntax
C# Visual Basic Visual C++
bool HasLineInfo()
Function HasLineInfo As Boolean
bool HasLineInfo()
Return Value
true if LineNumber and LinePosition can be provided; otherwise, false.


LineNumber Property

LineNumber Property
Namespaces ► Newtonsoft.Json ► IJsonLineInfo ► LineNumber
Gets the current line number.
Declaration Syntax
C# Visual Basic Visual C++
int LineNumber { get; }
ReadOnly Property LineNumber As Integer
    Get
property int LineNumber {
    int get ();
}
Value
The current line number or 0 if no line information is available (for example, HasLineInfo returns false).


LinePosition Property

LinePosition Property
Namespaces ► Newtonsoft.Json ► IJsonLineInfo ► LinePosition
Gets the current line position.
Declaration Syntax
C# Visual Basic Visual C++
int LinePosition { get; }
ReadOnly Property LinePosition As Integer
    Get
property int LinePosition {
    int get ();
}
Value
The current line position or 0 if no line information is available (for example, HasLineInfo returns false).


JsonArrayAttribute Class

JsonArrayAttribute Class
Namespaces ► Newtonsoft.Json ► JsonArrayAttribute
Instructs the JsonSerializer how to serialize the collection.
Declaration Syntax
C# Visual Basic Visual C++
public sealed class JsonArrayAttribute : JsonContainerAttribute
Public NotInheritable Class JsonArrayAttribute _
    Inherits JsonContainerAttribute
public ref class JsonArrayAttribute sealed : public JsonContainerAttribute
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonArrayAttribute()()()() | Initializes a new instance of the JsonArrayAttribute class.
 | JsonArrayAttribute(Boolean) | Initializes a new instance of the JsonObjectAttribute class with a flag indicating whether the array can contain null items
 | JsonArrayAttribute(String) | Initializes a new instance of the JsonArrayAttribute class with the specified container Id.
 | AllowNullItems | Gets or sets a value indicating whether null items are allowed in the collection.
 | Description | Gets or sets the description. (Inherited from JsonContainerAttribute.)
 | Equals(Object) | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Returns the hash code for this instance. (Inherited from Attribute.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Id | Gets or sets the id. (Inherited from JsonContainerAttribute.)
 | IsDefaultAttribute()()()() | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
 | IsReference | Gets or sets a value that indicates whether to preserve object reference data. (Inherited from JsonContainerAttribute.)
 | Match(Object) | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Title | Gets or sets the title. (Inherited from JsonContainerAttribute.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
Inheritance Hierarchy
Object
 | Attribute
 |  | JsonContainerAttribute
 |  |  | JsonArrayAttribute


JsonArrayAttribute Constructor

JsonArrayAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonArrayAttribute ► JsonArrayAttribute()()()()
Members
Icon | Member | Description
 | JsonArrayAttribute()()()() | Initializes a new instance of the JsonArrayAttribute class.
 | JsonArrayAttribute(Boolean) | Initializes a new instance of the JsonObjectAttribute class with a flag indicating whether the array can contain null items
 | JsonArrayAttribute(String) | Initializes a new instance of the JsonArrayAttribute class with the specified container Id.


JsonArrayAttribute Constructor

JsonArrayAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonArrayAttribute ► JsonArrayAttribute()()()()
Initializes a new instance of the JsonArrayAttribute class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonArrayAttribute()
Public Sub New
public:
JsonArrayAttribute()


JsonArrayAttribute Constructor (allowNullItems)

JsonArrayAttribute Constructor (allowNullItems)
Namespaces ► Newtonsoft.Json ► JsonArrayAttribute ► JsonArrayAttribute(Boolean)
Initializes a new instance of the JsonObjectAttribute class with a flag indicating whether the array can contain null items
Declaration Syntax
C# Visual Basic Visual C++
public JsonArrayAttribute(
    bool allowNullItems
)
Public Sub New ( _
    allowNullItems As Boolean _
)
public:
JsonArrayAttribute(
    bool allowNullItems
)
Parameters
allowNullItems (Boolean)
A flag indicating whether the array can contain null items.


JsonArrayAttribute Constructor (id)

JsonArrayAttribute Constructor (id)
Namespaces ► Newtonsoft.Json ► JsonArrayAttribute ► JsonArrayAttribute(String)
Initializes a new instance of the JsonArrayAttribute class with the specified container Id.
Declaration Syntax
C# Visual Basic Visual C++
public JsonArrayAttribute(
    string id
)
Public Sub New ( _
    id As String _
)
public:
JsonArrayAttribute(
    String^ id
)
Parameters
id (String)
The container Id.


AllowNullItems Property

AllowNullItems Property
Namespaces ► Newtonsoft.Json ► JsonArrayAttribute ► AllowNullItems
Gets or sets a value indicating whether null items are allowed in the collection.
Declaration Syntax
C# Visual Basic Visual C++
public bool AllowNullItems { get; set; }
Public Property AllowNullItems As Boolean
    Get
    Set
public:
property bool AllowNullItems {
    bool get ();
    void set (bool value);
}
Value
true if null items are allowed in the collection; otherwise, false.


JsonConstructorAttribute Class

JsonConstructorAttribute Class
Namespaces ► Newtonsoft.Json ► JsonConstructorAttribute
Instructs the JsonSerializer not to serialize the public field or public read/write property value.
Declaration Syntax
C# Visual Basic Visual C++
public sealed class JsonConstructorAttribute : Attribute
Public NotInheritable Class JsonConstructorAttribute _
    Inherits Attribute
public ref class JsonConstructorAttribute sealed : public Attribute
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonConstructorAttribute()()()() | Initializes a new instance of the JsonConstructorAttribute class
 | Equals(Object) | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Returns the hash code for this instance. (Inherited from Attribute.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsDefaultAttribute()()()() | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
 | Match(Object) | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
Inheritance Hierarchy
Object
 | Attribute
 |  | JsonConstructorAttribute


JsonConstructorAttribute Constructor

JsonConstructorAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonConstructorAttribute ► JsonConstructorAttribute()()()()
Initializes a new instance of the JsonConstructorAttribute class
Declaration Syntax
C# Visual Basic Visual C++
public JsonConstructorAttribute()
Public Sub New
public:
JsonConstructorAttribute()


JsonContainerAttribute Class

JsonContainerAttribute Class
Namespaces ► Newtonsoft.Json ► JsonContainerAttribute
Instructs the JsonSerializer how to serialize the object.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class JsonContainerAttribute : Attribute
Public MustInherit Class JsonContainerAttribute _
    Inherits Attribute
public ref class JsonContainerAttribute abstract : public Attribute
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonContainerAttribute()()()() | Initializes a new instance of the JsonContainerAttribute class.
 | JsonContainerAttribute(String) | Initializes a new instance of the JsonContainerAttribute class with the specified container Id.
 | Description | Gets or sets the description.
 | Equals(Object) | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Returns the hash code for this instance. (Inherited from Attribute.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Id | Gets or sets the id.
 | IsDefaultAttribute()()()() | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
 | IsReference | Gets or sets a value that indicates whether to preserve object reference data.
 | Match(Object) | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Title | Gets or sets the title.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
Inheritance Hierarchy
Object
 | Attribute
 |  | JsonContainerAttribute
 |  |  | JsonArrayAttribute
 |  |  | JsonObjectAttribute


JsonContainerAttribute Constructor

JsonContainerAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonContainerAttribute ► JsonContainerAttribute()()()()
Members
Icon | Member | Description
 | JsonContainerAttribute()()()() | Initializes a new instance of the JsonContainerAttribute class.
 | JsonContainerAttribute(String) | Initializes a new instance of the JsonContainerAttribute class with the specified container Id.


JsonContainerAttribute Constructor

JsonContainerAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonContainerAttribute ► JsonContainerAttribute()()()()
Initializes a new instance of the JsonContainerAttribute class.
Declaration Syntax
C# Visual Basic Visual C++
protected JsonContainerAttribute()
Protected Sub New
protected:
JsonContainerAttribute()


JsonContainerAttribute Constructor (id)

JsonContainerAttribute Constructor (id)
Namespaces ► Newtonsoft.Json ► JsonContainerAttribute ► JsonContainerAttribute(String)
Initializes a new instance of the JsonContainerAttribute class with the specified container Id.
Declaration Syntax
C# Visual Basic Visual C++
protected JsonContainerAttribute(
    string id
)
Protected Sub New ( _
    id As String _
)
protected:
JsonContainerAttribute(
    String^ id
)
Parameters
id (String)
The container Id.


Description Property

Description Property
Namespaces ► Newtonsoft.Json ► JsonContainerAttribute ► Description
Gets or sets the description.
Declaration Syntax
C# Visual Basic Visual C++
public string Description { get; set; }
Public Property Description As String
    Get
    Set
public:
property String^ Description {
    String^ get ();
    void set (String^ value);
}
Value
The description.


Id Property

Id Property
Namespaces ► Newtonsoft.Json ► JsonContainerAttribute ► Id
Gets or sets the id.
Declaration Syntax
C# Visual Basic Visual C++
public string Id { get; set; }
Public Property Id As String
    Get
    Set
public:
property String^ Id {
    String^ get ();
    void set (String^ value);
}
Value
The id.


IsReference Property

IsReference Property
Namespaces ► Newtonsoft.Json ► JsonContainerAttribute ► IsReference
Gets or sets a value that indicates whether to preserve object reference data.
Declaration Syntax
C# Visual Basic Visual C++
public bool IsReference { get; set; }
Public Property IsReference As Boolean
    Get
    Set
public:
property bool IsReference {
    bool get ();
    void set (bool value);
}
Value
true to keep object reference; otherwise, false. The default is false.


Title Property

Title Property
Namespaces ► Newtonsoft.Json ► JsonContainerAttribute ► Title
Gets or sets the title.
Declaration Syntax
C# Visual Basic Visual C++
public string Title { get; set; }
Public Property Title As String
    Get
    Set
public:
property String^ Title {
    String^ get ();
    void set (String^ value);
}
Value
The title.


JsonConvert Class

JsonConvert Class
Namespaces ► Newtonsoft.Json ► JsonConvert
Provides methods for converting between common language runtime types and JSON types.
Declaration Syntax
C# Visual Basic Visual C++
public static class JsonConvert
Public NotInheritable Class JsonConvert
public ref class JsonConvert abstract sealed
Members
All Members | Methods | Fields
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | DeserializeAnonymousType<(Of <<'(T>)>>)(String, T) | Deserializes the JSON to the given anonymous type.
 | DeserializeObject(String) | Deserializes the JSON to a .NET object.
 | DeserializeObject(String, JsonSerializerSettings) | Deserializes the JSON to a .NET object.
 | DeserializeObject(String, Type) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject<(Of <<'(T>)>>)(String) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject<(Of <<'(T>)>>)(String, array<JsonConverter>[]()[][]) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject<(Of <<'(T>)>>)(String, JsonSerializerSettings) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject(String, Type, array<JsonConverter>[]()[][]) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject(String, Type, JsonSerializerSettings) | Deserializes the JSON to the specified .NET type.
 | DeserializeXmlNode(String) | Deserializes the XmlNode from a JSON string.
 | DeserializeXmlNode(String, String) | Deserializes the XmlNode from a JSON string nested in a root elment.
 | DeserializeXmlNode(String, String, Boolean) | Deserializes the XmlNode from a JSON string nested in a root elment.
 | DeserializeXNode(String) | Deserializes the XNode from a JSON string.
 | DeserializeXNode(String, String) | Deserializes the XNode from a JSON string nested in a root elment.
 | DeserializeXNode(String, String, Boolean) | Deserializes the XNode from a JSON string nested in a root elment.
 | False | Represents JavaScript's boolean value false as a string. This field is read-only.
 | NaN | Represents JavaScript's NaN as a string. This field is read-only.
 | NegativeInfinity | Represents JavaScript's negative infinity as a string. This field is read-only.
 | Null | Represents JavaScript's null as a string. This field is read-only.
 | PopulateObject(String, Object) | Populates the object with values from the JSON string.
 | PopulateObject(String, Object, JsonSerializerSettings) | Populates the object with values from the JSON string.
 | PositiveInfinity | Represents JavaScript's positive infinity as a string. This field is read-only.
 | SerializeObject(Object) | Serializes the specified object to a JSON string.
 | SerializeObject(Object, Formatting) | Serializes the specified object to a JSON string.
 | SerializeObject(Object, array<JsonConverter>[]()[][]) | Serializes the specified object to a JSON string using a collection of JsonConverter.
 | SerializeObject(Object, Formatting, array<JsonConverter>[]()[][]) | Serializes the specified object to a JSON string using a collection of JsonConverter.
 | SerializeObject(Object, Formatting, JsonSerializerSettings) | Serializes the specified object to a JSON string using a collection of JsonConverter.
 | SerializeXmlNode(XmlNode) | Serializes the XML node to a JSON string.
 | SerializeXmlNode(XmlNode, Formatting) | Serializes the XML node to a JSON string.
 | SerializeXmlNode(XmlNode, Formatting, Boolean) | Serializes the XML node to a JSON string.
 | SerializeXNode(XObject) | Serializes the XNode to a JSON string.
 | SerializeXNode(XObject, Formatting) | Serializes the XNode to a JSON string.
 | SerializeXNode(XObject, Formatting, Boolean) | Serializes the XNode to a JSON string.
 | ToString(DateTime) | Converts the DateTime to its JSON string representation.
 | ToString(DateTimeOffset) | Converts the DateTimeOffset to its JSON string representation.
 | ToString(Boolean) | Converts the Boolean to its JSON string representation.
 | ToString(Char) | Converts the Char to its JSON string representation.
 | ToString(Enum) | Converts the Enum to its JSON string representation.
 | ToString(Int32) | Converts the Int32 to its JSON string representation.
 | ToString(Int16) | Converts the Int16 to its JSON string representation.
 | ToString(UInt16) | Converts the UInt16 to its JSON string representation.
 | ToString(UInt32) | Converts the UInt32 to its JSON string representation.
 | ToString(Int64) | Converts the Int64 to its JSON string representation.
 | ToString(UInt64) | Converts the UInt64 to its JSON string representation.
 | ToString(Single) | Converts the Single to its JSON string representation.
 | ToString(Double) | Converts the Double to its JSON string representation.
 | ToString(Byte) | Converts the Byte to its JSON string representation.
 | ToString(SByte) | Converts the SByte to its JSON string representation.
 | ToString(Decimal) | Converts the Decimal to its JSON string representation.
 | ToString(Guid) | Converts the Guid to its JSON string representation.
 | ToString(String) | Converts the String to its JSON string representation.
 | ToString(String, Char) | Converts the String to its JSON string representation.
 | ToString(Object) | Converts the Object to its JSON string representation.
 | True | Represents JavaScript's boolean value true as a string. This field is read-only.
 | Undefined | Represents JavaScript's undefined as a string. This field is read-only.
Inheritance Hierarchy
Object
JsonConvert


DeserializeAnonymousType Method (value, anonymousTypeObject)

DeserializeAnonymousType<(Of <(<'T>)>)> Method (value, anonymousTypeObject)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeAnonymousType<(Of <<'(T>)>>)(String, T)
Deserializes the JSON to the given anonymous type.
Declaration Syntax
C# Visual Basic Visual C++
public static T DeserializeAnonymousType<T>(
    string value,
    T anonymousTypeObject
)

Public Shared Function DeserializeAnonymousType(Of T) ( _
    value As String, _
    anonymousTypeObject As T _
) As T
public:
generic<typename T>
static T DeserializeAnonymousType(
    String^ value,
    T anonymousTypeObject
)
Generic Template Parameters
T
The anonymous type to deserialize to. This can't be specified traditionally and must be infered from the anonymous type passed as a parameter.
Parameters
value (String)
The JSON to deserialize.
anonymousTypeObject (T)
The anonymous type object.
Return Value
The deserialized anonymous type from the JSON string.


DeserializeObject Method

DeserializeObject Method
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeObject()()()()
Members
Icon | Member | Description
 | DeserializeObject(String) | Deserializes the JSON to a .NET object.
 | DeserializeObject(String, JsonSerializerSettings) | Deserializes the JSON to a .NET object.
 | DeserializeObject(String, Type) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject<(Of <<'(T>)>>)(String) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject<(Of <<'(T>)>>)(String, array<JsonConverter>[]()[][]) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject<(Of <<'(T>)>>)(String, JsonSerializerSettings) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject(String, Type, array<JsonConverter>[]()[][]) | Deserializes the JSON to the specified .NET type.
 | DeserializeObject(String, Type, JsonSerializerSettings) | Deserializes the JSON to the specified .NET type.


DeserializeObject Method (value)

DeserializeObject<(Of <(<'T>)>)> Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeObject<(Of <<'(T>)>>)(String)
Deserializes the JSON to the specified .NET type.
Declaration Syntax
C# Visual Basic Visual C++
public static T DeserializeObject<T>(
    string value
)

Public Shared Function DeserializeObject(Of T) ( _
    value As String _
) As T
public:
generic<typename T>
static T DeserializeObject(
    String^ value
)
Generic Template Parameters
T
The type of the object to deserialize to.
Parameters
value (String)
The JSON to deserialize.
Return Value
The deserialized object from the Json string.


DeserializeObject Method (value)

DeserializeObject Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeObject(String)
Deserializes the JSON to a .NET object.
Declaration Syntax
C# Visual Basic Visual C++
public static Object DeserializeObject(
    string value
)
Public Shared Function DeserializeObject ( _
    value As String _
) As Object
public:
static Object^ DeserializeObject(
    String^ value
)
Parameters
value (String)
The JSON to deserialize.
Return Value
The deserialized object from the Json string.


DeserializeObject Method (value, converters)

DeserializeObject<(Of <(<'T>)>)> Method (value, converters)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeObject<(Of <<'(T>)>>)(String, array<JsonConverter>[]()[][])
Deserializes the JSON to the specified .NET type.
Declaration Syntax
C# Visual Basic Visual C++
public static T DeserializeObject<T>(
    string value,
    params JsonConverter[] converters
)

Public Shared Function DeserializeObject(Of T) ( _
    value As String, _
    ParamArray converters As JsonConverter() _
) As T
public:
generic<typename T>
static T DeserializeObject(
    String^ value,
    ... array<JsonConverter^>^ converters
)
Generic Template Parameters
T
The type of the object to deserialize to.
Parameters
value (String)
The JSON to deserialize.
converters (array< JsonConverter >[]()[][])
Converters to use while deserializing.
Return Value
The deserialized object from the JSON string.


DeserializeObject Method (value, settings)

DeserializeObject<(Of <(<'T>)>)> Method (value, settings)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeObject<(Of <<'(T>)>>)(String, JsonSerializerSettings)
Deserializes the JSON to the specified .NET type.
Declaration Syntax
C# Visual Basic Visual C++
public static T DeserializeObject<T>(
    string value,
    JsonSerializerSettings settings
)

Public Shared Function DeserializeObject(Of T) ( _
    value As String, _
    settings As JsonSerializerSettings _
) As T
public:
generic<typename T>
static T DeserializeObject(
    String^ value,
    JsonSerializerSettings^ settings
)
Generic Template Parameters
T
The type of the object to deserialize to.
Parameters
value (String)
The object to deserialize.
settings (JsonSerializerSettings)
The JsonSerializerSettings used to deserialize the object. If this is null, default serialization settings will be is used.
Return Value
The deserialized object from the JSON string.


DeserializeObject Method (value, settings)

DeserializeObject Method (value, settings)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeObject(String, JsonSerializerSettings)
Deserializes the JSON to a .NET object.
Declaration Syntax
C# Visual Basic Visual C++
public static Object DeserializeObject(
    string value,
    JsonSerializerSettings settings
)
Public Shared Function DeserializeObject ( _
    value As String, _
    settings As JsonSerializerSettings _
) As Object
public:
static Object^ DeserializeObject(
    String^ value,
    JsonSerializerSettings^ settings
)
Parameters
value (String)
The JSON to deserialize.
settings (JsonSerializerSettings)
The JsonSerializerSettings used to deserialize the object. If this is null, default serialization settings will be is used.
Return Value
The deserialized object from the JSON string.


DeserializeObject Method (value, type)

DeserializeObject Method (value, type)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeObject(String, Type)
Deserializes the JSON to the specified .NET type.
Declaration Syntax
C# Visual Basic Visual C++
public static Object DeserializeObject(
    string value,
    Type type
)
Public Shared Function DeserializeObject ( _
    value As String, _
    type As Type _
) As Object
public:
static Object^ DeserializeObject(
    String^ value,
    Type^ type
)
Parameters
value (String)
The JSON to deserialize.
type (Type)
The Type of object being deserialized.
Return Value
The deserialized object from the Json string.


DeserializeObject Method (value, type, converters)

DeserializeObject Method (value, type, converters)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeObject(String, Type, array<JsonConverter>[]()[][])
Deserializes the JSON to the specified .NET type.
Declaration Syntax
C# Visual Basic Visual C++
public static Object DeserializeObject(
    string value,
    Type type,
    params JsonConverter[] converters
)
Public Shared Function DeserializeObject ( _
    value As String, _
    type As Type, _
    ParamArray converters As JsonConverter() _
) As Object
public:
static Object^ DeserializeObject(
    String^ value,
    Type^ type,
    ... array<JsonConverter^>^ converters
)
Parameters
value (String)
The JSON to deserialize.
type (Type)
The type of the object to deserialize.
converters (array< JsonConverter >[]()[][])
Converters to use while deserializing.
Return Value
The deserialized object from the JSON string.


DeserializeObject Method (value, type, settings)

DeserializeObject Method (value, type, settings)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeObject(String, Type, JsonSerializerSettings)
Deserializes the JSON to the specified .NET type.
Declaration Syntax
C# Visual Basic Visual C++
public static Object DeserializeObject(
    string value,
    Type type,
    JsonSerializerSettings settings
)
Public Shared Function DeserializeObject ( _
    value As String, _
    type As Type, _
    settings As JsonSerializerSettings _
) As Object
public:
static Object^ DeserializeObject(
    String^ value,
    Type^ type,
    JsonSerializerSettings^ settings
)
Parameters
value (String)
The JSON to deserialize.
type (Type)
The type of the object to deserialize to.
settings (JsonSerializerSettings)
The JsonSerializerSettings used to deserialize the object. If this is null, default serialization settings will be is used.
Return Value
The deserialized object from the JSON string.


DeserializeXmlNode Method

DeserializeXmlNode Method
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeXmlNode()()()()
Members
Icon | Member | Description
 | DeserializeXmlNode(String) | Deserializes the XmlNode from a JSON string.
 | DeserializeXmlNode(String, String) | Deserializes the XmlNode from a JSON string nested in a root elment.
 | DeserializeXmlNode(String, String, Boolean) | Deserializes the XmlNode from a JSON string nested in a root elment.


DeserializeXmlNode Method (value)

DeserializeXmlNode Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeXmlNode(String)
Deserializes the XmlNode from a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static XmlDocument DeserializeXmlNode(
    string value
)
Public Shared Function DeserializeXmlNode ( _
    value As String _
) As XmlDocument
public:
static XmlDocument^ DeserializeXmlNode(
    String^ value
)
Parameters
value (String)
The JSON string.
Return Value
The deserialized XmlNode


DeserializeXmlNode Method (value, deserializeRootElementName)

DeserializeXmlNode Method (value, deserializeRootElementName)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeXmlNode(String, String)
Deserializes the XmlNode from a JSON string nested in a root elment.
Declaration Syntax
C# Visual Basic Visual C++
public static XmlDocument DeserializeXmlNode(
    string value,
    string deserializeRootElementName
)
Public Shared Function DeserializeXmlNode ( _
    value As String, _
    deserializeRootElementName As String _
) As XmlDocument
public:
static XmlDocument^ DeserializeXmlNode(
    String^ value,
    String^ deserializeRootElementName
)
Parameters
value (String)
The JSON string.
deserializeRootElementName (String)
The name of the root element to append when deserializing.
Return Value
The deserialized XmlNode


DeserializeXmlNode Method (value, deserializeRootElementName, writeArrayAttribute)

DeserializeXmlNode Method (value, deserializeRootElementName, writeArrayAttribute)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeXmlNode(String, String, Boolean)
Deserializes the XmlNode from a JSON string nested in a root elment.
Declaration Syntax
C# Visual Basic Visual C++
public static XmlDocument DeserializeXmlNode(
    string value,
    string deserializeRootElementName,
    bool writeArrayAttribute
)
Public Shared Function DeserializeXmlNode ( _
    value As String, _
    deserializeRootElementName As String, _
    writeArrayAttribute As Boolean _
) As XmlDocument
public:
static XmlDocument^ DeserializeXmlNode(
    String^ value,
    String^ deserializeRootElementName,
    bool writeArrayAttribute
)
Parameters
value (String)
The JSON string.
deserializeRootElementName (String)
The name of the root element to append when deserializing.
writeArrayAttribute (Boolean)
A flag to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON.
Return Value
The deserialized XmlNode


DeserializeXNode Method

DeserializeXNode Method
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeXNode()()()()
Members
Icon | Member | Description
 | DeserializeXNode(String) | Deserializes the XNode from a JSON string.
 | DeserializeXNode(String, String) | Deserializes the XNode from a JSON string nested in a root elment.
 | DeserializeXNode(String, String, Boolean) | Deserializes the XNode from a JSON string nested in a root elment.


DeserializeXNode Method (value)

DeserializeXNode Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeXNode(String)
Deserializes the XNode from a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static XDocument DeserializeXNode(
    string value
)
Public Shared Function DeserializeXNode ( _
    value As String _
) As XDocument
public:
static XDocument^ DeserializeXNode(
    String^ value
)
Parameters
value (String)
The JSON string.
Return Value
The deserialized XNode


DeserializeXNode Method (value, deserializeRootElementName)

DeserializeXNode Method (value, deserializeRootElementName)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeXNode(String, String)
Deserializes the XNode from a JSON string nested in a root elment.
Declaration Syntax
C# Visual Basic Visual C++
public static XDocument DeserializeXNode(
    string value,
    string deserializeRootElementName
)
Public Shared Function DeserializeXNode ( _
    value As String, _
    deserializeRootElementName As String _
) As XDocument
public:
static XDocument^ DeserializeXNode(
    String^ value,
    String^ deserializeRootElementName
)
Parameters
value (String)
The JSON string.
deserializeRootElementName (String)
The name of the root element to append when deserializing.
Return Value
The deserialized XNode


DeserializeXNode Method (value, deserializeRootElementName, writeArrayAttribute)

DeserializeXNode Method (value, deserializeRootElementName, writeArrayAttribute)
Namespaces ► Newtonsoft.Json ► JsonConvert ► DeserializeXNode(String, String, Boolean)
Deserializes the XNode from a JSON string nested in a root elment.
Declaration Syntax
C# Visual Basic Visual C++
public static XDocument DeserializeXNode(
    string value,
    string deserializeRootElementName,
    bool writeArrayAttribute
)
Public Shared Function DeserializeXNode ( _
    value As String, _
    deserializeRootElementName As String, _
    writeArrayAttribute As Boolean _
) As XDocument
public:
static XDocument^ DeserializeXNode(
    String^ value,
    String^ deserializeRootElementName,
    bool writeArrayAttribute
)
Parameters
value (String)
The JSON string.
deserializeRootElementName (String)
The name of the root element to append when deserializing.
writeArrayAttribute (Boolean)
A flag to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON.
Return Value
The deserialized XNode


False Field

False Field
Namespaces ► Newtonsoft.Json ► JsonConvert ► False
Represents JavaScript's boolean value false as a string. This field is read-only.
Declaration Syntax
C# Visual Basic Visual C++
public static readonly string False
Public Shared ReadOnly False As String
public:
static initonly String^ False


NaN Field

NaN Field
Namespaces ► Newtonsoft.Json ► JsonConvert ► NaN
Represents JavaScript's NaN as a string. This field is read-only.
Declaration Syntax
C# Visual Basic Visual C++
public static readonly string NaN
Public Shared ReadOnly NaN As String
public:
static initonly String^ NaN


NegativeInfinity Field

NegativeInfinity Field
Namespaces ► Newtonsoft.Json ► JsonConvert ► NegativeInfinity
Represents JavaScript's negative infinity as a string. This field is read-only.
Declaration Syntax
C# Visual Basic Visual C++
public static readonly string NegativeInfinity
Public Shared ReadOnly NegativeInfinity As String
public:
static initonly String^ NegativeInfinity


Null Field

Null Field
Namespaces ► Newtonsoft.Json ► JsonConvert ► Null
Represents JavaScript's null as a string. This field is read-only.
Declaration Syntax
C# Visual Basic Visual C++
public static readonly string Null
Public Shared ReadOnly Null As String
public:
static initonly String^ Null


PopulateObject Method

PopulateObject Method
Namespaces ► Newtonsoft.Json ► JsonConvert ► PopulateObject()()()()
Members
Icon | Member | Description
 | PopulateObject(String, Object) | Populates the object with values from the JSON string.
 | PopulateObject(String, Object, JsonSerializerSettings) | Populates the object with values from the JSON string.


PopulateObject Method (value, target)

PopulateObject Method (value, target)
Namespaces ► Newtonsoft.Json ► JsonConvert ► PopulateObject(String, Object)
Populates the object with values from the JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static void PopulateObject(
    string value,
    Object target
)
Public Shared Sub PopulateObject ( _
    value As String, _
    target As Object _
)
public:
static void PopulateObject(
    String^ value,
    Object^ target
)
Parameters
value (String)
The JSON to populate values from.
target (Object)
The target object to populate values onto.


PopulateObject Method (value, target, settings)

PopulateObject Method (value, target, settings)
Namespaces ► Newtonsoft.Json ► JsonConvert ► PopulateObject(String, Object, JsonSerializerSettings)
Populates the object with values from the JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static void PopulateObject(
    string value,
    Object target,
    JsonSerializerSettings settings
)
Public Shared Sub PopulateObject ( _
    value As String, _
    target As Object, _
    settings As JsonSerializerSettings _
)
public:
static void PopulateObject(
    String^ value,
    Object^ target,
    JsonSerializerSettings^ settings
)
Parameters
value (String)
The JSON to populate values from.
target (Object)
The target object to populate values onto.
settings (JsonSerializerSettings)
The JsonSerializerSettings used to deserialize the object. If this is null, default serialization settings will be is used.


PositiveInfinity Field

PositiveInfinity Field
Namespaces ► Newtonsoft.Json ► JsonConvert ► PositiveInfinity
Represents JavaScript's positive infinity as a string. This field is read-only.
Declaration Syntax
C# Visual Basic Visual C++
public static readonly string PositiveInfinity
Public Shared ReadOnly PositiveInfinity As String
public:
static initonly String^ PositiveInfinity


SerializeObject Method

SerializeObject Method
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeObject()()()()
Members
Icon | Member | Description
 | SerializeObject(Object) | Serializes the specified object to a JSON string.
 | SerializeObject(Object, Formatting) | Serializes the specified object to a JSON string.
 | SerializeObject(Object, array<JsonConverter>[]()[][]) | Serializes the specified object to a JSON string using a collection of JsonConverter.
 | SerializeObject(Object, Formatting, array<JsonConverter>[]()[][]) | Serializes the specified object to a JSON string using a collection of JsonConverter.
 | SerializeObject(Object, Formatting, JsonSerializerSettings) | Serializes the specified object to a JSON string using a collection of JsonConverter.


SerializeObject Method (value)

SerializeObject Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeObject(Object)
Serializes the specified object to a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeObject(
    Object value
)
Public Shared Function SerializeObject ( _
    value As Object _
) As String
public:
static String^ SerializeObject(
    Object^ value
)
Parameters
value (Object)
The object to serialize.
Return Value
A JSON string representation of the object.


SerializeObject Method (value, formatting)

SerializeObject Method (value, formatting)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeObject(Object, Formatting)
Serializes the specified object to a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeObject(
    Object value,
    Formatting formatting
)
Public Shared Function SerializeObject ( _
    value As Object, _
    formatting As Formatting _
) As String
public:
static String^ SerializeObject(
    Object^ value,
    Formatting formatting
)
Parameters
value (Object)
The object to serialize.
formatting (Formatting)
Indicates how the output is formatted.
Return Value
A JSON string representation of the object.


SerializeObject Method (value, formatting, converters)

SerializeObject Method (value, formatting, converters)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeObject(Object, Formatting, array<JsonConverter>[]()[][])
Serializes the specified object to a JSON string using a collection of JsonConverter.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeObject(
    Object value,
    Formatting formatting,
    params JsonConverter[] converters
)
Public Shared Function SerializeObject ( _
    value As Object, _
    formatting As Formatting, _
    ParamArray converters As JsonConverter() _
) As String
public:
static String^ SerializeObject(
    Object^ value,
    Formatting formatting,
    ... array<JsonConverter^>^ converters
)
Parameters
value (Object)
The object to serialize.
formatting (Formatting)
Indicates how the output is formatted.
converters (array< JsonConverter >[]()[][])
A collection converters used while serializing.
Return Value
A JSON string representation of the object.


SerializeObject Method (value, formatting, settings)

SerializeObject Method (value, formatting, settings)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeObject(Object, Formatting, JsonSerializerSettings)
Serializes the specified object to a JSON string using a collection of JsonConverter.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeObject(
    Object value,
    Formatting formatting,
    JsonSerializerSettings settings
)
Public Shared Function SerializeObject ( _
    value As Object, _
    formatting As Formatting, _
    settings As JsonSerializerSettings _
) As String
public:
static String^ SerializeObject(
    Object^ value,
    Formatting formatting,
    JsonSerializerSettings^ settings
)
Parameters
value (Object)
The object to serialize.
formatting (Formatting)
Indicates how the output is formatted.
settings (JsonSerializerSettings)
The JsonSerializerSettings used to serialize the object. If this is null, default serialization settings will be is used.
Return Value
A JSON string representation of the object.


SerializeObject Method (value, converters)

SerializeObject Method (value, converters)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeObject(Object, array<JsonConverter>[]()[][])
Serializes the specified object to a JSON string using a collection of JsonConverter.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeObject(
    Object value,
    params JsonConverter[] converters
)
Public Shared Function SerializeObject ( _
    value As Object, _
    ParamArray converters As JsonConverter() _
) As String
public:
static String^ SerializeObject(
    Object^ value,
    ... array<JsonConverter^>^ converters
)
Parameters
value (Object)
The object to serialize.
converters (array< JsonConverter >[]()[][])
A collection converters used while serializing.
Return Value
A JSON string representation of the object.


SerializeXmlNode Method

SerializeXmlNode Method
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeXmlNode()()()()
Members
Icon | Member | Description
 | SerializeXmlNode(XmlNode) | Serializes the XML node to a JSON string.
 | SerializeXmlNode(XmlNode, Formatting) | Serializes the XML node to a JSON string.
 | SerializeXmlNode(XmlNode, Formatting, Boolean) | Serializes the XML node to a JSON string.


SerializeXmlNode Method (node)

SerializeXmlNode Method (node)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeXmlNode(XmlNode)
Serializes the XML node to a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeXmlNode(
    XmlNode node
)
Public Shared Function SerializeXmlNode ( _
    node As XmlNode _
) As String
public:
static String^ SerializeXmlNode(
    XmlNode^ node
)
Parameters
node (XmlNode)
The node to serialize.
Return Value
A JSON string of the XmlNode.


SerializeXmlNode Method (node, formatting)

SerializeXmlNode Method (node, formatting)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeXmlNode(XmlNode, Formatting)
Serializes the XML node to a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeXmlNode(
    XmlNode node,
    Formatting formatting
)
Public Shared Function SerializeXmlNode ( _
    node As XmlNode, _
    formatting As Formatting _
) As String
public:
static String^ SerializeXmlNode(
    XmlNode^ node,
    Formatting formatting
)
Parameters
node (XmlNode)
The node to serialize.
formatting (Formatting)
Indicates how the output is formatted.
Return Value
A JSON string of the XmlNode.


SerializeXmlNode Method (node, formatting, omitRootObject)

SerializeXmlNode Method (node, formatting, omitRootObject)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeXmlNode(XmlNode, Formatting, Boolean)
Serializes the XML node to a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeXmlNode(
    XmlNode node,
    Formatting formatting,
    bool omitRootObject
)
Public Shared Function SerializeXmlNode ( _
    node As XmlNode, _
    formatting As Formatting, _
    omitRootObject As Boolean _
) As String
public:
static String^ SerializeXmlNode(
    XmlNode^ node,
    Formatting formatting,
    bool omitRootObject
)
Parameters
node (XmlNode)
The node to serialize.
formatting (Formatting)
Indicates how the output is formatted.
omitRootObject (Boolean)
Omits writing the root object.
Return Value
A JSON string of the XmlNode.


SerializeXNode Method

SerializeXNode Method
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeXNode()()()()
Members
Icon | Member | Description
 | SerializeXNode(XObject) | Serializes the XNode to a JSON string.
 | SerializeXNode(XObject, Formatting) | Serializes the XNode to a JSON string.
 | SerializeXNode(XObject, Formatting, Boolean) | Serializes the XNode to a JSON string.


SerializeXNode Method (node)

SerializeXNode Method (node)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeXNode(XObject)
Serializes the XNode to a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeXNode(
    XObject node
)
Public Shared Function SerializeXNode ( _
    node As XObject _
) As String
public:
static String^ SerializeXNode(
    XObject^ node
)
Parameters
node (XObject)
The node to convert to JSON.
Return Value
A JSON string of the XNode.


SerializeXNode Method (node, formatting)

SerializeXNode Method (node, formatting)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeXNode(XObject, Formatting)
Serializes the XNode to a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeXNode(
    XObject node,
    Formatting formatting
)
Public Shared Function SerializeXNode ( _
    node As XObject, _
    formatting As Formatting _
) As String
public:
static String^ SerializeXNode(
    XObject^ node,
    Formatting formatting
)
Parameters
node (XObject)
The node to convert to JSON.
formatting (Formatting)
Indicates how the output is formatted.
Return Value
A JSON string of the XNode.


SerializeXNode Method (node, formatting, omitRootObject)

SerializeXNode Method (node, formatting, omitRootObject)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeXNode(XObject, Formatting, Boolean)
Serializes the XNode to a JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public static string SerializeXNode(
    XObject node,
    Formatting formatting,
    bool omitRootObject
)
Public Shared Function SerializeXNode ( _
    node As XObject, _
    formatting As Formatting, _
    omitRootObject As Boolean _
) As String
public:
static String^ SerializeXNode(
    XObject^ node,
    Formatting formatting,
    bool omitRootObject
)
Parameters
node (XObject)
The node to serialize.
formatting (Formatting)
Indicates how the output is formatted.
omitRootObject (Boolean)
Omits writing the root object.
Return Value
A JSON string of the XNode.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString()()()()
Members
Icon | Member | Description
 | ToString(DateTime) | Converts the DateTime to its JSON string representation.
 | ToString(DateTimeOffset) | Converts the DateTimeOffset to its JSON string representation.
 | ToString(Boolean) | Converts the Boolean to its JSON string representation.
 | ToString(Char) | Converts the Char to its JSON string representation.
 | ToString(Enum) | Converts the Enum to its JSON string representation.
 | ToString(Int32) | Converts the Int32 to its JSON string representation.
 | ToString(Int16) | Converts the Int16 to its JSON string representation.
 | ToString(UInt16) | Converts the UInt16 to its JSON string representation.
 | ToString(UInt32) | Converts the UInt32 to its JSON string representation.
 | ToString(Int64) | Converts the Int64 to its JSON string representation.
 | ToString(UInt64) | Converts the UInt64 to its JSON string representation.
 | ToString(Single) | Converts the Single to its JSON string representation.
 | ToString(Double) | Converts the Double to its JSON string representation.
 | ToString(Byte) | Converts the Byte to its JSON string representation.
 | ToString(SByte) | Converts the SByte to its JSON string representation.
 | ToString(Decimal) | Converts the Decimal to its JSON string representation.
 | ToString(Guid) | Converts the Guid to its JSON string representation.
 | ToString(String) | Converts the String to its JSON string representation.
 | ToString(String, Char) | Converts the String to its JSON string representation.
 | ToString(Object) | Converts the Object to its JSON string representation.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Boolean)
Converts the Boolean to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    bool value
)
Public Shared Function ToString ( _
    value As Boolean _
) As String
public:
static String^ ToString(
    bool value
)
Parameters
value (Boolean)
The value to convert.
Return Value
A JSON string representation of the Boolean.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Byte)
Converts the Byte to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    byte value
)
Public Shared Function ToString ( _
    value As Byte _
) As String
public:
static String^ ToString(
    unsigned char value
)
Parameters
value (Byte)
The value to convert.
Return Value
A JSON string representation of the Byte.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Char)
Converts the Char to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    char value
)
Public Shared Function ToString ( _
    value As Char _
) As String
public:
static String^ ToString(
    wchar_t value
)
Parameters
value (Char)
The value to convert.
Return Value
A JSON string representation of the Char.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(DateTime)
Converts the DateTime to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    DateTime value
)
Public Shared Function ToString ( _
    value As DateTime _
) As String
public:
static String^ ToString(
    DateTime value
)
Parameters
value (DateTime)
The value to convert.
Return Value
A JSON string representation of the DateTime.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(DateTimeOffset)
Converts the DateTimeOffset to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    DateTimeOffset value
)
Public Shared Function ToString ( _
    value As DateTimeOffset _
) As String
public:
static String^ ToString(
    DateTimeOffset value
)
Parameters
value (DateTimeOffset)
The value to convert.
Return Value
A JSON string representation of the DateTimeOffset.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Decimal)
Converts the Decimal to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    decimal value
)
Public Shared Function ToString ( _
    value As Decimal _
) As String
public:
static String^ ToString(
    Decimal value
)
Parameters
value (Decimal)
The value to convert.
Return Value
A JSON string representation of the SByte.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Double)
Converts the Double to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    double value
)
Public Shared Function ToString ( _
    value As Double _
) As String
public:
static String^ ToString(
    double value
)
Parameters
value (Double)
The value to convert.
Return Value
A JSON string representation of the Double.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Enum)
Converts the Enum to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    Enum value
)
Public Shared Function ToString ( _
    value As Enum _
) As String
public:
static String^ ToString(
    Enum^ value
)
Parameters
value (Enum)
The value to convert.
Return Value
A JSON string representation of the Enum.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Guid)
Converts the Guid to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    Guid value
)
Public Shared Function ToString ( _
    value As Guid _
) As String
public:
static String^ ToString(
    Guid value
)
Parameters
value (Guid)
The value to convert.
Return Value
A JSON string representation of the Guid.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Int16)
Converts the Int16 to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    short value
)
Public Shared Function ToString ( _
    value As Short _
) As String
public:
static String^ ToString(
    short value
)
Parameters
value (Int16)
The value to convert.
Return Value
A JSON string representation of the Int16.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Int32)
Converts the Int32 to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    int value
)
Public Shared Function ToString ( _
    value As Integer _
) As String
public:
static String^ ToString(
    int value
)
Parameters
value (Int32)
The value to convert.
Return Value
A JSON string representation of the Int32.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Int64)
Converts the Int64 to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    long value
)
Public Shared Function ToString ( _
    value As Long _
) As String
public:
static String^ ToString(
    long long value
)
Parameters
value (Int64)
The value to convert.
Return Value
A JSON string representation of the Int64.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Object)
Converts the Object to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    Object value
)
Public Shared Function ToString ( _
    value As Object _
) As String
public:
static String^ ToString(
    Object^ value
)
Parameters
value (Object)
The value to convert.
Return Value
A JSON string representation of the Object.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(SByte)
Converts the SByte to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    sbyte value
)
Public Shared Function ToString ( _
    value As SByte _
) As String
public:
static String^ ToString(
    signed char value
)
Parameters
value (SByte)
The value to convert.
Return Value
A JSON string representation of the SByte.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(Single)
Converts the Single to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    float value
)
Public Shared Function ToString ( _
    value As Single _
) As String
public:
static String^ ToString(
    float value
)
Parameters
value (Single)
The value to convert.
Return Value
A JSON string representation of the Single.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(String)
Converts the String to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    string value
)
Public Shared Function ToString ( _
    value As String _
) As String
public:
static String^ ToString(
    String^ value
)
Parameters
value (String)
The value to convert.
Return Value
A JSON string representation of the String.


ToString Method (value, delimter)

ToString Method (value, delimter)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(String, Char)
Converts the String to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    string value,
    char delimter
)
Public Shared Function ToString ( _
    value As String, _
    delimter As Char _
) As String
public:
static String^ ToString(
    String^ value,
    wchar_t delimter
)
Parameters
value (String)
The value to convert.
delimter (Char)
The string delimiter character.
Return Value
A JSON string representation of the String.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(UInt16)
Converts the UInt16 to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    ushort value
)
Public Shared Function ToString ( _
    value As UShort _
) As String
public:
static String^ ToString(
    unsigned short value
)
Parameters
value (UInt16)
The value to convert.
Return Value
A JSON string representation of the UInt16.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(UInt32)
Converts the UInt32 to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    uint value
)
Public Shared Function ToString ( _
    value As UInteger _
) As String
public:
static String^ ToString(
    unsigned int value
)
Parameters
value (UInt32)
The value to convert.
Return Value
A JSON string representation of the UInt32.


ToString Method (value)

ToString Method (value)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(UInt64)
Converts the UInt64 to its JSON string representation.
Declaration Syntax
C# Visual Basic Visual C++
public static string ToString(
    ulong value
)
Public Shared Function ToString ( _
    value As ULong _
) As String
public:
static String^ ToString(
    unsigned long long value
)
Parameters
value (UInt64)
The value to convert.
Return Value
A JSON string representation of the UInt64.


True Field

True Field
Namespaces ► Newtonsoft.Json ► JsonConvert ► True
Represents JavaScript's boolean value true as a string. This field is read-only.
Declaration Syntax
C# Visual Basic Visual C++
public static readonly string True
Public Shared ReadOnly True As String
public:
static initonly String^ True


Undefined Field

Undefined Field
Namespaces ► Newtonsoft.Json ► JsonConvert ► Undefined
Represents JavaScript's undefined as a string. This field is read-only.
Declaration Syntax
C# Visual Basic Visual C++
public static readonly string Undefined
Public Shared ReadOnly Undefined As String
public:
static initonly String^ Undefined


JsonConverter Class

JsonConverter Class
Namespaces ► Newtonsoft.Json ► JsonConverter
Converts an object to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class JsonConverter
Public MustInherit Class JsonConverter
public ref class JsonConverter abstract
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonConverter()()()() | Initializes a new instance of the JsonConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type.
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON.
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter.
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object.
Inheritance Hierarchy
Object
 | JsonConverter
 |  | BinaryConverter
 |  | BsonObjectIdConverter
 |  | CustomCreationConverter<(Of <(<'T>)>)>
 |  | DataSetConverter
 |  | DataTableConverter
 |  | DateTimeConverterBase
 |  | EntityKeyMemberConverter
 |  | ExpandoObjectConverter
 |  | KeyValuePairConverter
 |  | RegexConverter
 |  | StringEnumConverter
 |  | XmlNodeConverter


JsonConverter Constructor

JsonConverter Constructor
Namespaces ► Newtonsoft.Json ► JsonConverter ► JsonConverter()()()()
Initializes a new instance of the JsonConverter class
Declaration Syntax
C# Visual Basic Visual C++
protected JsonConverter()
Protected Sub New
protected:
JsonConverter()


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json ► JsonConverter ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public abstract bool CanConvert(
    Type objectType
)
Public MustOverride Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) abstract
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


CanRead Property

CanRead Property
Namespaces ► Newtonsoft.Json ► JsonConverter ► CanRead
Gets a value indicating whether this JsonConverter can read JSON.
Declaration Syntax
C# Visual Basic Visual C++
public virtual bool CanRead { get; }
Public Overridable ReadOnly Property CanRead As Boolean
    Get
public:
virtual property bool CanRead {
    bool get ();
}
Value
true if this JsonConverter can read JSON; otherwise, false.


CanWrite Property

CanWrite Property
Namespaces ► Newtonsoft.Json ► JsonConverter ► CanWrite
Gets a value indicating whether this JsonConverter can write JSON.
Declaration Syntax
C# Visual Basic Visual C++
public virtual bool CanWrite { get; }
Public Overridable ReadOnly Property CanWrite As Boolean
    Get
public:
virtual property bool CanWrite {
    bool get ();
}
Value
true if this JsonConverter can write JSON; otherwise, false.


GetSchema Method

GetSchema Method
Namespaces ► Newtonsoft.Json ► JsonConverter ► GetSchema()()()()
Gets the JsonSchema of the JSON produced by the JsonConverter.
Declaration Syntax
C# Visual Basic Visual C++
public virtual JsonSchema GetSchema()
Public Overridable Function GetSchema As JsonSchema
public:
virtual JsonSchema^ GetSchema()
Return Value
The JsonSchema of the JSON produced by the JsonConverter.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json ► JsonConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public abstract Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public MustOverride Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) abstract
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json ► JsonConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public abstract void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public MustOverride Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) abstract
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


JsonConverterAttribute Class

JsonConverterAttribute Class
Namespaces ► Newtonsoft.Json ► JsonConverterAttribute
Instructs the JsonSerializer to use the specified JsonConverter when serializing the member or class.
Declaration Syntax
C# Visual Basic Visual C++
public sealed class JsonConverterAttribute : Attribute
Public NotInheritable Class JsonConverterAttribute _
    Inherits Attribute
public ref class JsonConverterAttribute sealed : public Attribute
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonConverterAttribute(Type) | Initializes a new instance of the JsonConverterAttribute class.
 | ConverterType | Gets the type of the converter.
 | Equals(Object) | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Returns the hash code for this instance. (Inherited from Attribute.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsDefaultAttribute()()()() | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
 | Match(Object) | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
Inheritance Hierarchy
Object
 | Attribute
 |  | JsonConverterAttribute


JsonConverterAttribute Constructor (converterType)

JsonConverterAttribute Constructor (converterType)
Namespaces ► Newtonsoft.Json ► JsonConverterAttribute ► JsonConverterAttribute(Type)
Initializes a new instance of the JsonConverterAttribute class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonConverterAttribute(
    Type converterType
)
Public Sub New ( _
    converterType As Type _
)
public:
JsonConverterAttribute(
    Type^ converterType
)
Parameters
converterType (Type)
Type of the converter.


ConverterType Property

ConverterType Property
Namespaces ► Newtonsoft.Json ► JsonConverterAttribute ► ConverterType
Gets the type of the converter.
Declaration Syntax
C# Visual Basic Visual C++
public Type ConverterType { get; }
Public ReadOnly Property ConverterType As Type
    Get
public:
property Type^ ConverterType {
    Type^ get ();
}
Value
The type of the converter.


JsonConverterCollection Class

JsonConverterCollection Class
Namespaces ► Newtonsoft.Json ► JsonConverterCollection
Represents a collection of JsonConverter.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonConverterCollection : Collection<JsonConverter>
Public Class JsonConverterCollection _
    Inherits Collection(Of JsonConverter)
public ref class JsonConverterCollection : public Collection<JsonConverter^>
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonConverterCollection()()()() | Initializes a new instance of the JsonConverterCollection class
 | Add(T) | Adds an object to the end of the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | Clear()()()() | Removes all elements from the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | ClearItems()()()() | Removes all elements from the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | Contains(T) | Determines whether an element is in the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | CopyTo(array<T>[]()[][], Int32) | Copies the entire Collection<(Of <(<'T>)>)> to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | Count | Gets the number of elements actually contained in the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetEnumerator()()()() | Returns an enumerator that iterates through the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IndexOf(T) | Searches for the specified object and returns the zero-based index of the first occurrence within the entire Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | Insert(Int32, T) | Inserts an element into the Collection<(Of <(<'T>)>)> at the specified index. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | InsertItem(Int32, T) | Inserts an element into the Collection<(Of <(<'T>)>)> at the specified index. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | Item[([( Int32])]) | Gets or sets the element at the specified index. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | Items | Gets a IList<(Of <(<'T>)>)> wrapper around the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Remove(T) | Removes the first occurrence of a specific object from the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | RemoveAt(Int32) | Removes the element at the specified index of the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | RemoveItem(Int32) | Removes the element at the specified index of the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | SetItem(Int32, T) | Replaces the element at the specified index. (Inherited from Collection <(Of <(<' JsonConverter >)>)>.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | Collection <(Of <(<' JsonConverter >)>)>
 |  | JsonConverterCollection


JsonConverterCollection Constructor

JsonConverterCollection Constructor
Namespaces ► Newtonsoft.Json ► JsonConverterCollection ► JsonConverterCollection()()()()
Initializes a new instance of the JsonConverterCollection class
Declaration Syntax
C# Visual Basic Visual C++
public JsonConverterCollection()
Public Sub New
public:
JsonConverterCollection()


JsonIgnoreAttribute Class

JsonIgnoreAttribute Class
Namespaces ► Newtonsoft.Json ► JsonIgnoreAttribute
Instructs the JsonSerializer not to serialize the public field or public read/write property value.
Declaration Syntax
C# Visual Basic Visual C++
public sealed class JsonIgnoreAttribute : Attribute
Public NotInheritable Class JsonIgnoreAttribute _
    Inherits Attribute
public ref class JsonIgnoreAttribute sealed : public Attribute
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonIgnoreAttribute()()()() | Initializes a new instance of the JsonIgnoreAttribute class
 | Equals(Object) | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Returns the hash code for this instance. (Inherited from Attribute.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsDefaultAttribute()()()() | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
 | Match(Object) | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
Inheritance Hierarchy
Object
 | Attribute
 |  | JsonIgnoreAttribute


JsonIgnoreAttribute Constructor

JsonIgnoreAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonIgnoreAttribute ► JsonIgnoreAttribute()()()()
Initializes a new instance of the JsonIgnoreAttribute class
Declaration Syntax
C# Visual Basic Visual C++
public JsonIgnoreAttribute()
Public Sub New
public:
JsonIgnoreAttribute()


JsonObjectAttribute Class

JsonObjectAttribute Class
Namespaces ► Newtonsoft.Json ► JsonObjectAttribute
Instructs the JsonSerializer how to serialize the object.
Declaration Syntax
C# Visual Basic Visual C++
public sealed class JsonObjectAttribute : JsonContainerAttribute
Public NotInheritable Class JsonObjectAttribute _
    Inherits JsonContainerAttribute
public ref class JsonObjectAttribute sealed : public JsonContainerAttribute
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonObjectAttribute()()()() | Initializes a new instance of the JsonObjectAttribute class.
 | JsonObjectAttribute(MemberSerialization) | Initializes a new instance of the JsonObjectAttribute class with the specified member serialization.
 | JsonObjectAttribute(String) | Initializes a new instance of the JsonObjectAttribute class with the specified container Id.
 | Description | Gets or sets the description. (Inherited from JsonContainerAttribute.)
 | Equals(Object) | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Returns the hash code for this instance. (Inherited from Attribute.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Id | Gets or sets the id. (Inherited from JsonContainerAttribute.)
 | IsDefaultAttribute()()()() | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
 | IsReference | Gets or sets a value that indicates whether to preserve object reference data. (Inherited from JsonContainerAttribute.)
 | Match(Object) | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
 | MemberSerialization | Gets or sets the member serialization.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Title | Gets or sets the title. (Inherited from JsonContainerAttribute.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
Inheritance Hierarchy
Object
 | Attribute
 |  | JsonContainerAttribute
 |  |  | JsonObjectAttribute


JsonObjectAttribute Constructor

JsonObjectAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonObjectAttribute ► JsonObjectAttribute()()()()
Members
Icon | Member | Description
 | JsonObjectAttribute()()()() | Initializes a new instance of the JsonObjectAttribute class.
 | JsonObjectAttribute(MemberSerialization) | Initializes a new instance of the JsonObjectAttribute class with the specified member serialization.
 | JsonObjectAttribute(String) | Initializes a new instance of the JsonObjectAttribute class with the specified container Id.


JsonObjectAttribute Constructor

JsonObjectAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonObjectAttribute ► JsonObjectAttribute()()()()
Initializes a new instance of the JsonObjectAttribute class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonObjectAttribute()
Public Sub New
public:
JsonObjectAttribute()


JsonObjectAttribute Constructor (memberSerialization)

JsonObjectAttribute Constructor (memberSerialization)
Namespaces ► Newtonsoft.Json ► JsonObjectAttribute ► JsonObjectAttribute(MemberSerialization)
Initializes a new instance of the JsonObjectAttribute class with the specified member serialization.
Declaration Syntax
C# Visual Basic Visual C++
public JsonObjectAttribute(
    MemberSerialization memberSerialization
)
Public Sub New ( _
    memberSerialization As MemberSerialization _
)
public:
JsonObjectAttribute(
    MemberSerialization memberSerialization
)
Parameters
memberSerialization (MemberSerialization)
The member serialization.


JsonObjectAttribute Constructor (id)

JsonObjectAttribute Constructor (id)
Namespaces ► Newtonsoft.Json ► JsonObjectAttribute ► JsonObjectAttribute(String)
Initializes a new instance of the JsonObjectAttribute class with the specified container Id.
Declaration Syntax
C# Visual Basic Visual C++
public JsonObjectAttribute(
    string id
)
Public Sub New ( _
    id As String _
)
public:
JsonObjectAttribute(
    String^ id
)
Parameters
id (String)
The container Id.


MemberSerialization Property

MemberSerialization Property
Namespaces ► Newtonsoft.Json ► JsonObjectAttribute ► MemberSerialization
Gets or sets the member serialization.
Declaration Syntax
C# Visual Basic Visual C++
public MemberSerialization MemberSerialization { get; set; }
Public Property MemberSerialization As MemberSerialization
    Get
    Set
public:
property MemberSerialization MemberSerialization {
    MemberSerialization get ();
    void set (MemberSerialization value);
}
Value
The member serialization.


JsonPropertyAttribute Class

JsonPropertyAttribute Class
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute
Instructs the JsonSerializer to always serialize the member with the specified name.
Declaration Syntax
C# Visual Basic Visual C++
public sealed class JsonPropertyAttribute : Attribute
Public NotInheritable Class JsonPropertyAttribute _
    Inherits Attribute
public ref class JsonPropertyAttribute sealed : public Attribute
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonPropertyAttribute()()()() | Initializes a new instance of the JsonPropertyAttribute class.
 | JsonPropertyAttribute(String) | Initializes a new instance of the JsonPropertyAttribute class with the specified name.
 | DefaultValueHandling | Gets or sets the default value handling used when serializing this property.
 | Equals(Object) | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Returns the hash code for this instance. (Inherited from Attribute.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsDefaultAttribute()()()() | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
 | IsReference | Gets or sets whether this property's value is serialized as a reference.
 | Match(Object) | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | NullValueHandling | Gets or sets the null value handling used when serializing this property.
 | ObjectCreationHandling | Gets or sets the object creation handling used when deserializing this property.
 | PropertyName | Gets or sets the name of the property.
 | ReferenceLoopHandling | Gets or sets the reference loop handling used when serializing this property.
 | Required | Gets or sets a value indicating whether this property is required.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
 | TypeNameHandling | Gets or sets the type name handling used when serializing this property.
Inheritance Hierarchy
Object
 | Attribute
 |  | JsonPropertyAttribute


JsonPropertyAttribute Constructor

JsonPropertyAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► JsonPropertyAttribute()()()()
Members
Icon | Member | Description
 | JsonPropertyAttribute()()()() | Initializes a new instance of the JsonPropertyAttribute class.
 | JsonPropertyAttribute(String) | Initializes a new instance of the JsonPropertyAttribute class with the specified name.


JsonPropertyAttribute Constructor

JsonPropertyAttribute Constructor
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► JsonPropertyAttribute()()()()
Initializes a new instance of the JsonPropertyAttribute class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonPropertyAttribute()
Public Sub New
public:
JsonPropertyAttribute()


JsonPropertyAttribute Constructor (propertyName)

JsonPropertyAttribute Constructor (propertyName)
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► JsonPropertyAttribute(String)
Initializes a new instance of the JsonPropertyAttribute class with the specified name.
Declaration Syntax
C# Visual Basic Visual C++
public JsonPropertyAttribute(
    string propertyName
)
Public Sub New ( _
    propertyName As String _
)
public:
JsonPropertyAttribute(
    String^ propertyName
)
Parameters
propertyName (String)
Name of the property.


DefaultValueHandling Property

DefaultValueHandling Property
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► DefaultValueHandling
Gets or sets the default value handling used when serializing this property.
Declaration Syntax
C# Visual Basic Visual C++
public DefaultValueHandling DefaultValueHandling { get; set; }
Public Property DefaultValueHandling As DefaultValueHandling
    Get
    Set
public:
property DefaultValueHandling DefaultValueHandling {
    DefaultValueHandling get ();
    void set (DefaultValueHandling value);
}
Value
The default value handling.


IsReference Property

IsReference Property
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► IsReference
Gets or sets whether this property's value is serialized as a reference.
Declaration Syntax
C# Visual Basic Visual C++
public bool IsReference { get; set; }
Public Property IsReference As Boolean
    Get
    Set
public:
property bool IsReference {
    bool get ();
    void set (bool value);
}
Value
Whether this property's value is serialized as a reference.


NullValueHandling Property

NullValueHandling Property
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► NullValueHandling
Gets or sets the null value handling used when serializing this property.
Declaration Syntax
C# Visual Basic Visual C++
public NullValueHandling NullValueHandling { get; set; }
Public Property NullValueHandling As NullValueHandling
    Get
    Set
public:
property NullValueHandling NullValueHandling {
    NullValueHandling get ();
    void set (NullValueHandling value);
}
Value
The null value handling.


ObjectCreationHandling Property

ObjectCreationHandling Property
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► ObjectCreationHandling
Gets or sets the object creation handling used when deserializing this property.
Declaration Syntax
C# Visual Basic Visual C++
public ObjectCreationHandling ObjectCreationHandling { get; set; }
Public Property ObjectCreationHandling As ObjectCreationHandling
    Get
    Set
public:
property ObjectCreationHandling ObjectCreationHandling {
    ObjectCreationHandling get ();
    void set (ObjectCreationHandling value);
}
Value
The object creation handling.


PropertyName Property

PropertyName Property
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► PropertyName
Gets or sets the name of the property.
Declaration Syntax
C# Visual Basic Visual C++
public string PropertyName { get; set; }
Public Property PropertyName As String
    Get
    Set
public:
property String^ PropertyName {
    String^ get ();
    void set (String^ value);
}
Value
The name of the property.


ReferenceLoopHandling Property

ReferenceLoopHandling Property
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► ReferenceLoopHandling
Gets or sets the reference loop handling used when serializing this property.
Declaration Syntax
C# Visual Basic Visual C++
public ReferenceLoopHandling ReferenceLoopHandling { get; set; }
Public Property ReferenceLoopHandling As ReferenceLoopHandling
    Get
    Set
public:
property ReferenceLoopHandling ReferenceLoopHandling {
    ReferenceLoopHandling get ();
    void set (ReferenceLoopHandling value);
}
Value
The reference loop handling.


Required Property

Required Property
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► Required
Gets or sets a value indicating whether this property is required.
Declaration Syntax
C# Visual Basic Visual C++
public Required Required { get; set; }
Public Property Required As Required
    Get
    Set
public:
property Required Required {
    Required get ();
    void set (Required value);
}
Value
A value indicating whether this property is required.


TypeNameHandling Property

TypeNameHandling Property
Namespaces ► Newtonsoft.Json ► JsonPropertyAttribute ► TypeNameHandling
Gets or sets the type name handling used when serializing this property.
Declaration Syntax
C# Visual Basic Visual C++
public TypeNameHandling TypeNameHandling { get; set; }
Public Property TypeNameHandling As TypeNameHandling
    Get
    Set
public:
property TypeNameHandling TypeNameHandling {
    TypeNameHandling get ();
    void set (TypeNameHandling value);
}
Value
The type name handling.


JsonReader Class

JsonReader Class
Namespaces ► Newtonsoft.Json ► JsonReader
Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class JsonReader : IDisposable
Public MustInherit Class JsonReader _
    Implements IDisposable
public ref class JsonReader abstract : IDisposable
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonReader()()()() | Initializes a new instance of the JsonReader class with the specified TextReader.
 | Close()()()() | Changes the JsonReader..::..State to Closed.
 | CloseInput | Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed.
 | CurrentState | Gets the current reader state.
 | Depth | Gets the depth of the current token in the JSON document.
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | QuoteChar | Gets the quotation mark character used to enclose the value of a string.
 | Read()()()() | Reads the next JSON token from the stream.
 | ReadAsBytes()()()() | Reads the next JSON token from the stream as a array<Byte>[]()[][].
 | ReadAsDateTimeOffset()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
 | ReadAsDecimal()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
 | SetStateBasedOnCurrent()()()() | Sets the state based on current token type.
 | SetToken(JsonToken) | Sets the current token.
 | SetToken(JsonToken, Object) | Sets the current token and value.
 | Skip()()()() | Skips the children of the current token.
 | TokenType | Gets the type of the current Json token.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Value | Gets the text value of the current Json token.
 | ValueType | Gets The Common Language Runtime (CLR) type for the current Json token.
Inheritance Hierarchy
Object
 | JsonReader
 |  | BsonReader
 |  | JsonTextReader
 |  | JsonValidatingReader
 |  | JTokenReader


JsonReader Constructor

JsonReader Constructor
Namespaces ► Newtonsoft.Json ► JsonReader ► JsonReader()()()()
Initializes a new instance of the JsonReader class with the specified TextReader.
Declaration Syntax
C# Visual Basic Visual C++
protected JsonReader()
Protected Sub New
protected:
JsonReader()


Close Method

Close Method
Namespaces ► Newtonsoft.Json ► JsonReader ► Close()()()()
Changes the JsonReader..::..State to Closed.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void Close()
Public Overridable Sub Close
public:
virtual void Close()


CloseInput Property

CloseInput Property
Namespaces ► Newtonsoft.Json ► JsonReader ► CloseInput
Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed.
Declaration Syntax
C# Visual Basic Visual C++
public bool CloseInput { get; set; }
Public Property CloseInput As Boolean
    Get
    Set
public:
property bool CloseInput {
    bool get ();
    void set (bool value);
}
Value
true to close the underlying stream or TextReader when the reader is closed; otherwise false. The default is true.


CurrentState Property

CurrentState Property
Namespaces ► Newtonsoft.Json ► JsonReader ► CurrentState
Gets the current reader state.
Declaration Syntax
C# Visual Basic Visual C++
protected JsonReader..::..State CurrentState { get; }
Protected ReadOnly Property CurrentState As JsonReader..::..State
    Get
protected:
property JsonReader..::..State CurrentState {
    JsonReader..::..State get ();
}
Value
The current reader state.


Depth Property

Depth Property
Namespaces ► Newtonsoft.Json ► JsonReader ► Depth
Gets the depth of the current token in the JSON document.
Declaration Syntax
C# Visual Basic Visual C++
public virtual int Depth { get; }
Public Overridable ReadOnly Property Depth As Integer
    Get
public:
virtual property int Depth {
    int get ();
}
Value
The depth of the current token in the JSON document.


Dispose Method (disposing)

Dispose Method (disposing)
Namespaces ► Newtonsoft.Json ► JsonReader ► Dispose(Boolean)
Releases unmanaged and - optionally - managed resources
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void Dispose(
    bool disposing
)
Protected Overridable Sub Dispose ( _
    disposing As Boolean _
)
protected:
virtual void Dispose(
    bool disposing
)
Parameters
disposing (Boolean)
true to release both managed and unmanaged resources; false to release only unmanaged resources.


QuoteChar Property

QuoteChar Property
Namespaces ► Newtonsoft.Json ► JsonReader ► QuoteChar
Gets the quotation mark character used to enclose the value of a string.
Declaration Syntax
C# Visual Basic Visual C++
public virtual char QuoteChar { get; protected internal set; }
Public Overridable Property QuoteChar As Char
    Get
    Protected Friend Set
public:
virtual property wchar_t QuoteChar {
    wchar_t get ();
    protected public: void set (wchar_t value);
}


Read Method

Read Method
Namespaces ► Newtonsoft.Json ► JsonReader ► Read()()()()
Reads the next JSON token from the stream.
Declaration Syntax
C# Visual Basic Visual C++
public abstract bool Read()
Public MustOverride Function Read As Boolean
public:
virtual bool Read() abstract
Return Value
true if the next token was read successfully; false if there are no more tokens to read.


ReadAsBytes Method

ReadAsBytes Method
Namespaces ► Newtonsoft.Json ► JsonReader ► ReadAsBytes()()()()
Reads the next JSON token from the stream as a array<Byte>[]()[][].
Declaration Syntax
C# Visual Basic Visual C++
public abstract byte[] ReadAsBytes()
Public MustOverride Function ReadAsBytes As Byte()
public:
virtual array<unsigned char>^ ReadAsBytes() abstract
Return Value
A array<Byte>[]()[][] or a null reference if the next JSON token is null.


ReadAsDateTimeOffset Method

ReadAsDateTimeOffset Method
Namespaces ► Newtonsoft.Json ► JsonReader ► ReadAsDateTimeOffset()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public abstract Nullable<DateTimeOffset> ReadAsDateTimeOffset()
Public MustOverride Function ReadAsDateTimeOffset As Nullable(Of DateTimeOffset)
public:
virtual Nullable<DateTimeOffset> ReadAsDateTimeOffset() abstract
Return Value
A Nullable<(Of <(<'T>)>)>.


ReadAsDecimal Method

ReadAsDecimal Method
Namespaces ► Newtonsoft.Json ► JsonReader ► ReadAsDecimal()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public abstract Nullable<decimal> ReadAsDecimal()
Public MustOverride Function ReadAsDecimal As Nullable(Of Decimal)
public:
virtual Nullable<Decimal> ReadAsDecimal() abstract
Return Value
A Nullable<(Of <(<'T>)>)>.


SetStateBasedOnCurrent Method

SetStateBasedOnCurrent Method
Namespaces ► Newtonsoft.Json ► JsonReader ► SetStateBasedOnCurrent()()()()
Sets the state based on current token type.
Declaration Syntax
C# Visual Basic Visual C++
protected void SetStateBasedOnCurrent()
Protected Sub SetStateBasedOnCurrent
protected:
void SetStateBasedOnCurrent()


SetToken Method

SetToken Method
Namespaces ► Newtonsoft.Json ► JsonReader ► SetToken()()()()
Members
Icon | Member | Description
 | SetToken(JsonToken) | Sets the current token.
 | SetToken(JsonToken, Object) | Sets the current token and value.


SetToken Method (newToken)

SetToken Method (newToken)
Namespaces ► Newtonsoft.Json ► JsonReader ► SetToken(JsonToken)
Sets the current token.
Declaration Syntax
C# Visual Basic Visual C++
protected void SetToken(
    JsonToken newToken
)
Protected Sub SetToken ( _
    newToken As JsonToken _
)
protected:
void SetToken(
    JsonToken newToken
)
Parameters
newToken (JsonToken)
The new token.


SetToken Method (newToken, value)

SetToken Method (newToken, value)
Namespaces ► Newtonsoft.Json ► JsonReader ► SetToken(JsonToken, Object)
Sets the current token and value.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void SetToken(
    JsonToken newToken,
    Object value
)
Protected Overridable Sub SetToken ( _
    newToken As JsonToken, _
    value As Object _
)
protected:
virtual void SetToken(
    JsonToken newToken,
    Object^ value
)
Parameters
newToken (JsonToken)
The new token.
value (Object)
The value.


Skip Method

Skip Method
Namespaces ► Newtonsoft.Json ► JsonReader ► Skip()()()()
Skips the children of the current token.
Declaration Syntax
C# Visual Basic Visual C++
public void Skip()
Public Sub Skip
public:
void Skip()


TokenType Property

TokenType Property
Namespaces ► Newtonsoft.Json ► JsonReader ► TokenType
Gets the type of the current Json token.
Declaration Syntax
C# Visual Basic Visual C++
public virtual JsonToken TokenType { get; }
Public Overridable ReadOnly Property TokenType As JsonToken
    Get
public:
virtual property JsonToken TokenType {
    JsonToken get ();
}


Value Property

Value Property
Namespaces ► Newtonsoft.Json ► JsonReader ► Value
Gets the text value of the current Json token.
Declaration Syntax
C# Visual Basic Visual C++
public virtual Object Value { get; }
Public Overridable ReadOnly Property Value As Object
    Get
public:
virtual property Object^ Value {
    Object^ get ();
}


ValueType Property

ValueType Property
Namespaces ► Newtonsoft.Json ► JsonReader ► ValueType
Gets The Common Language Runtime (CLR) type for the current Json token.
Declaration Syntax
C# Visual Basic Visual C++
public virtual Type ValueType { get; }
Public Overridable ReadOnly Property ValueType As Type
    Get
public:
virtual property Type^ ValueType {
    Type^ get ();
}


JsonReader.State Enumeration

JsonReader..::..State Enumeration
Namespaces ► Newtonsoft.Json ► JsonReader ► JsonReader..::..State
Specifies the state of the reader.
Declaration Syntax
C# Visual Basic Visual C++
protected enum State
Protected Enumeration State
protected enum class State
Members
Member | Description
Start | The Read method has not been called.
Complete | The end of the file has been reached successfully.
Property | Reader is at a property.
ObjectStart | Reader is at the start of an object.
Object | Reader is in an object.
ArrayStart | Reader is at the start of an array.
Array | Reader is in an array.
Closed | The Close method has been called.
PostValue | Reader has just read a value.
ConstructorStart | Reader is at the start of a constructor.
Constructor | Reader in a constructor.
Error | An error occurred that prevents the read operation from continuing.
Finished | The end of the file has been reached successfully.


JsonReaderException Class

JsonReaderException Class
Namespaces ► Newtonsoft.Json ► JsonReaderException
The exception thrown when an error occurs while reading Json text.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonReaderException : Exception
Public Class JsonReaderException _
    Inherits Exception
public ref class JsonReaderException : public Exception
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonReaderException()()()() | Initializes a new instance of the JsonReaderException class.
 | JsonReaderException(String) | Initializes a new instance of the JsonReaderException class with a specified error message.
 | JsonReaderException(String, Exception) | Initializes a new instance of the JsonReaderException class with a specified error message and a reference to the inner exception that is the cause of this exception.
 | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetBaseException()()()() | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetObjectData(SerializationInfo, StreamingContext) | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
 | GetType()()()() | Gets the runtime type of the current instance. (Inherited from Exception.)
 | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
 | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
 | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
 | LineNumber | Gets the line number indicating where the error occurred.
 | LinePosition | Gets the line position indicating where the error occurred.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Message | Gets a message that describes the current exception. (Inherited from Exception.)
 | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
 | StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.)
 | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
 | ToString()()()() | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Inheritance Hierarchy
Object
 | Exception
 |  | JsonReaderException


JsonReaderException Constructor

JsonReaderException Constructor
Namespaces ► Newtonsoft.Json ► JsonReaderException ► JsonReaderException()()()()
Members
Icon | Member | Description
 | JsonReaderException()()()() | Initializes a new instance of the JsonReaderException class.
 | JsonReaderException(String) | Initializes a new instance of the JsonReaderException class with a specified error message.
 | JsonReaderException(String, Exception) | Initializes a new instance of the JsonReaderException class with a specified error message and a reference to the inner exception that is the cause of this exception.


JsonReaderException Constructor

JsonReaderException Constructor
Namespaces ► Newtonsoft.Json ► JsonReaderException ► JsonReaderException()()()()
Initializes a new instance of the JsonReaderException class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonReaderException()
Public Sub New
public:
JsonReaderException()


JsonReaderException Constructor (message)

JsonReaderException Constructor (message)
Namespaces ► Newtonsoft.Json ► JsonReaderException ► JsonReaderException(String)
Initializes a new instance of the JsonReaderException class with a specified error message.
Declaration Syntax
C# Visual Basic Visual C++
public JsonReaderException(
    string message
)
Public Sub New ( _
    message As String _
)
public:
JsonReaderException(
    String^ message
)
Parameters
message (String)
The error message that explains the reason for the exception.


JsonReaderException Constructor (message, innerException)

JsonReaderException Constructor (message, innerException)
Namespaces ► Newtonsoft.Json ► JsonReaderException ► JsonReaderException(String, Exception)
Initializes a new instance of the JsonReaderException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration Syntax
C# Visual Basic Visual C++
public JsonReaderException(
    string message,
    Exception innerException
)
Public Sub New ( _
    message As String, _
    innerException As Exception _
)
public:
JsonReaderException(
    String^ message,
    Exception^ innerException
)
Parameters
message (String)
The error message that explains the reason for the exception.
innerException (Exception)
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.


LineNumber Property

LineNumber Property
Namespaces ► Newtonsoft.Json ► JsonReaderException ► LineNumber
Gets the line number indicating where the error occurred.
Declaration Syntax
C# Visual Basic Visual C++
public int LineNumber { get; private set; }
Public Property LineNumber As Integer
    Get
    Private Set
public:
property int LineNumber {
    int get ();
    private: void set (int value);
}
Value
The line number indicating where the error occurred.


LinePosition Property

LinePosition Property
Namespaces ► Newtonsoft.Json ► JsonReaderException ► LinePosition
Gets the line position indicating where the error occurred.
Declaration Syntax
C# Visual Basic Visual C++
public int LinePosition { get; private set; }
Public Property LinePosition As Integer
    Get
    Private Set
public:
property int LinePosition {
    int get ();
    private: void set (int value);
}
Value
The line position indicating where the error occurred.


JsonSerializationException Class

JsonSerializationException Class
Namespaces ► Newtonsoft.Json ► JsonSerializationException
The exception thrown when an error occurs during Json serialization or deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonSerializationException : Exception
Public Class JsonSerializationException _
    Inherits Exception
public ref class JsonSerializationException : public Exception
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonSerializationException()()()() | Initializes a new instance of the JsonSerializationException class.
 | JsonSerializationException(String) | Initializes a new instance of the JsonSerializationException class with a specified error message.
 | JsonSerializationException(String, Exception) | Initializes a new instance of the JsonSerializationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
 | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetBaseException()()()() | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetObjectData(SerializationInfo, StreamingContext) | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
 | GetType()()()() | Gets the runtime type of the current instance. (Inherited from Exception.)
 | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
 | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
 | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Message | Gets a message that describes the current exception. (Inherited from Exception.)
 | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
 | StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.)
 | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
 | ToString()()()() | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Inheritance Hierarchy
Object
 | Exception
 |  | JsonSerializationException


JsonSerializationException Constructor

JsonSerializationException Constructor
Namespaces ► Newtonsoft.Json ► JsonSerializationException ► JsonSerializationException()()()()
Members
Icon | Member | Description
 | JsonSerializationException()()()() | Initializes a new instance of the JsonSerializationException class.
 | JsonSerializationException(String) | Initializes a new instance of the JsonSerializationException class with a specified error message.
 | JsonSerializationException(String, Exception) | Initializes a new instance of the JsonSerializationException class with a specified error message and a reference to the inner exception that is the cause of this exception.


JsonSerializationException Constructor

JsonSerializationException Constructor
Namespaces ► Newtonsoft.Json ► JsonSerializationException ► JsonSerializationException()()()()
Initializes a new instance of the JsonSerializationException class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSerializationException()
Public Sub New
public:
JsonSerializationException()


JsonSerializationException Constructor (message)

JsonSerializationException Constructor (message)
Namespaces ► Newtonsoft.Json ► JsonSerializationException ► JsonSerializationException(String)
Initializes a new instance of the JsonSerializationException class with a specified error message.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSerializationException(
    string message
)
Public Sub New ( _
    message As String _
)
public:
JsonSerializationException(
    String^ message
)
Parameters
message (String)
The error message that explains the reason for the exception.


JsonSerializationException Constructor (message, innerException)

JsonSerializationException Constructor (message, innerException)
Namespaces ► Newtonsoft.Json ► JsonSerializationException ► JsonSerializationException(String, Exception)
Initializes a new instance of the JsonSerializationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSerializationException(
    string message,
    Exception innerException
)
Public Sub New ( _
    message As String, _
    innerException As Exception _
)
public:
JsonSerializationException(
    String^ message,
    Exception^ innerException
)
Parameters
message (String)
The error message that explains the reason for the exception.
innerException (Exception)
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.


JsonSerializer Class

JsonSerializer Class
Namespaces ► Newtonsoft.Json ► JsonSerializer
Serializes and deserializes objects into and from the JSON format. The JsonSerializer enables you to control how objects are encoded into JSON.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonSerializer
Public Class JsonSerializer
public ref class JsonSerializer
Members
All Members | Constructors | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonSerializer()()()() | Initializes a new instance of the JsonSerializer class.
 | Binder | Gets or sets the SerializationBinder used by the serializer when resolving type names.
 | ConstructorHandling | Gets or sets how constructors are used during deserialization.
 | Context | Gets or sets the StreamingContext used by the serializer when invoking serialization callback methods.
 | ContractResolver | Gets or sets the contract resolver used by the serializer when serializing .NET objects to JSON and vice versa.
 | Converters | Gets a collection JsonConverter that will be used during serialization.
 | Create(JsonSerializerSettings) | Creates a new JsonSerializer instance using the specified JsonSerializerSettings.
 | DefaultValueHandling | Get or set how null default are handled during serialization and deserialization.
 | Deserialize(JsonReader) | Deserializes the Json structure contained by the specified JsonReader.
 | Deserialize(TextReader, Type) | Deserializes the Json structure contained by the specified StringReader into an instance of the specified type.
 | Deserialize<(Of <<'(T>)>>)(JsonReader) | Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.
 | Deserialize(JsonReader, Type) | Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Error | Occurs when the JsonSerializer errors during serialization and deserialization.
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | MissingMemberHandling | Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
 | NullValueHandling | Get or set how null values are handled during serialization and deserialization.
 | ObjectCreationHandling | Gets or sets how objects are created during deserialization.
 | Populate(TextReader, Object) | Populates the JSON values onto the target object.
 | Populate(JsonReader, Object) | Populates the JSON values onto the target object.
 | PreserveReferencesHandling | Gets or sets how object references are preserved by the serializer.
 | ReferenceLoopHandling | Get or set how reference loops (e.g. a class referencing itself) is handled.
 | ReferenceResolver | Gets or sets the IReferenceResolver used by the serializer when resolving references.
 | Serialize(TextWriter, Object) | Serializes the specified Object and writes the Json structure to a Stream using the specified TextWriter.
 | Serialize(JsonWriter, Object) | Serializes the specified Object and writes the Json structure to a Stream using the specified JsonWriter.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeNameAssemblyFormat | Gets or sets how a type name assembly is written and resolved by the serializer.
 | TypeNameHandling | Gets or sets how type name writing and reading is handled by the serializer.
Inheritance Hierarchy
Object
JsonSerializer


JsonSerializer Constructor

JsonSerializer Constructor
Namespaces ► Newtonsoft.Json ► JsonSerializer ► JsonSerializer()()()()
Initializes a new instance of the JsonSerializer class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSerializer()
Public Sub New
public:
JsonSerializer()


Binder Property

Binder Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Binder
Gets or sets the SerializationBinder used by the serializer when resolving type names.
Declaration Syntax
C# Visual Basic Visual C++
public virtual SerializationBinder Binder { get; set; }
Public Overridable Property Binder As SerializationBinder
    Get
    Set
public:
virtual property SerializationBinder^ Binder {
    SerializationBinder^ get ();
    void set (SerializationBinder^ value);
}


ConstructorHandling Property

ConstructorHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► ConstructorHandling
Gets or sets how constructors are used during deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public virtual ConstructorHandling ConstructorHandling { get; set; }
Public Overridable Property ConstructorHandling As ConstructorHandling
    Get
    Set
public:
virtual property ConstructorHandling ConstructorHandling {
    ConstructorHandling get ();
    void set (ConstructorHandling value);
}
Value
The constructor handling.


Context Property

Context Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Context
Gets or sets the StreamingContext used by the serializer when invoking serialization callback methods.
Declaration Syntax
C# Visual Basic Visual C++
public virtual StreamingContext Context { get; set; }
Public Overridable Property Context As StreamingContext
    Get
    Set
public:
virtual property StreamingContext Context {
    StreamingContext get ();
    void set (StreamingContext value);
}
Value
The context.


ContractResolver Property

ContractResolver Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► ContractResolver
Gets or sets the contract resolver used by the serializer when serializing .NET objects to JSON and vice versa.
Declaration Syntax
C# Visual Basic Visual C++
public virtual IContractResolver ContractResolver { get; set; }
Public Overridable Property ContractResolver As IContractResolver
    Get
    Set
public:
virtual property IContractResolver^ ContractResolver {
    IContractResolver^ get ();
    void set (IContractResolver^ value);
}


Converters Property

Converters Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Converters
Gets a collection JsonConverter that will be used during serialization.
Declaration Syntax
C# Visual Basic Visual C++
public virtual JsonConverterCollection Converters { get; }
Public Overridable ReadOnly Property Converters As JsonConverterCollection
    Get
public:
virtual property JsonConverterCollection^ Converters {
    JsonConverterCollection^ get ();
}
Value
Collection JsonConverter that will be used during serialization.


Create Method (settings)

Create Method (settings)
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Create(JsonSerializerSettings)
Creates a new JsonSerializer instance using the specified JsonSerializerSettings.
Declaration Syntax
C# Visual Basic Visual C++
public static JsonSerializer Create(
    JsonSerializerSettings settings
)
Public Shared Function Create ( _
    settings As JsonSerializerSettings _
) As JsonSerializer
public:
static JsonSerializer^ Create(
    JsonSerializerSettings^ settings
)
Parameters
settings (JsonSerializerSettings)
The settings to be applied to the JsonSerializer.
Return Value
A new JsonSerializer instance using the specified JsonSerializerSettings.


DefaultValueHandling Property

DefaultValueHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► DefaultValueHandling
Get or set how null default are handled during serialization and deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public virtual DefaultValueHandling DefaultValueHandling { get; set; }
Public Overridable Property DefaultValueHandling As DefaultValueHandling
    Get
    Set
public:
virtual property DefaultValueHandling DefaultValueHandling {
    DefaultValueHandling get ();
    void set (DefaultValueHandling value);
}


Deserialize Method

Deserialize Method
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Deserialize()()()()
Members
Icon | Member | Description
 | Deserialize(JsonReader) | Deserializes the Json structure contained by the specified JsonReader.
 | Deserialize(TextReader, Type) | Deserializes the Json structure contained by the specified StringReader into an instance of the specified type.
 | Deserialize<(Of <<'(T>)>>)(JsonReader) | Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.
 | Deserialize(JsonReader, Type) | Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.


Deserialize Method (reader)

Deserialize Method (reader)
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Deserialize(JsonReader)
Deserializes the Json structure contained by the specified JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public Object Deserialize(
    JsonReader reader
)
Public Function Deserialize ( _
    reader As JsonReader _
) As Object
public:
Object^ Deserialize(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
The JsonReader that contains the JSON structure to deserialize.
Return Value
The Object being deserialized.


Deserialize Method (reader)

Deserialize<(Of <(<'T>)>)> Method (reader)
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Deserialize<(Of <<'(T>)>>)(JsonReader)
Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.
Declaration Syntax
C# Visual Basic Visual C++
public T Deserialize<T>(
    JsonReader reader
)

Public Function Deserialize(Of T) ( _
    reader As JsonReader _
) As T
public:
generic<typename T>
T Deserialize(
    JsonReader^ reader
)
Generic Template Parameters
T
The type of the object to deserialize.
Parameters
reader (JsonReader)
The JsonReader containing the object.
Return Value
The instance of T being deserialized.


Deserialize Method (reader, objectType)

Deserialize Method (reader, objectType)
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Deserialize(JsonReader, Type)
Deserializes the Json structure contained by the specified JsonReader into an instance of the specified type.
Declaration Syntax
C# Visual Basic Visual C++
public Object Deserialize(
    JsonReader reader,
    Type objectType
)
Public Function Deserialize ( _
    reader As JsonReader, _
    objectType As Type _
) As Object
public:
Object^ Deserialize(
    JsonReader^ reader,
    Type^ objectType
)
Parameters
reader (JsonReader)
The JsonReader containing the object.
objectType (Type)
The Type of object being deserialized.
Return Value
The instance of objectType being deserialized.


Deserialize Method (reader, objectType)

Deserialize Method (reader, objectType)
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Deserialize(TextReader, Type)
Deserializes the Json structure contained by the specified StringReader into an instance of the specified type.
Declaration Syntax
C# Visual Basic Visual C++
public Object Deserialize(
    TextReader reader,
    Type objectType
)
Public Function Deserialize ( _
    reader As TextReader, _
    objectType As Type _
) As Object
public:
Object^ Deserialize(
    TextReader^ reader,
    Type^ objectType
)
Parameters
reader (TextReader)
The TextReader containing the object.
objectType (Type)
The Type of object being deserialized.
Return Value
The instance of objectType being deserialized.


Error Event

Error Event
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Error
Occurs when the JsonSerializer errors during serialization and deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public virtual event EventHandler<ErrorEventArgs> Error
Public Overridable Event Error As EventHandler(Of ErrorEventArgs)
public:
virtual  event EventHandler<ErrorEventArgs^>^ Error {
    void add (EventHandler<ErrorEventArgs^>^ value);
    void remove (EventHandler<ErrorEventArgs^>^ value);
}


MissingMemberHandling Property

MissingMemberHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► MissingMemberHandling
Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public virtual MissingMemberHandling MissingMemberHandling { get; set; }
Public Overridable Property MissingMemberHandling As MissingMemberHandling
    Get
    Set
public:
virtual property MissingMemberHandling MissingMemberHandling {
    MissingMemberHandling get ();
    void set (MissingMemberHandling value);
}


NullValueHandling Property

NullValueHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► NullValueHandling
Get or set how null values are handled during serialization and deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public virtual NullValueHandling NullValueHandling { get; set; }
Public Overridable Property NullValueHandling As NullValueHandling
    Get
    Set
public:
virtual property NullValueHandling NullValueHandling {
    NullValueHandling get ();
    void set (NullValueHandling value);
}


ObjectCreationHandling Property

ObjectCreationHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► ObjectCreationHandling
Gets or sets how objects are created during deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public virtual ObjectCreationHandling ObjectCreationHandling { get; set; }
Public Overridable Property ObjectCreationHandling As ObjectCreationHandling
    Get
    Set
public:
virtual property ObjectCreationHandling ObjectCreationHandling {
    ObjectCreationHandling get ();
    void set (ObjectCreationHandling value);
}
Value
The object creation handling.


Populate Method

Populate Method
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Populate()()()()
Members
Icon | Member | Description
 | Populate(TextReader, Object) | Populates the JSON values onto the target object.
 | Populate(JsonReader, Object) | Populates the JSON values onto the target object.


Populate Method (reader, target)

Populate Method (reader, target)
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Populate(JsonReader, Object)
Populates the JSON values onto the target object.
Declaration Syntax
C# Visual Basic Visual C++
public void Populate(
    JsonReader reader,
    Object target
)
Public Sub Populate ( _
    reader As JsonReader, _
    target As Object _
)
public:
void Populate(
    JsonReader^ reader,
    Object^ target
)
Parameters
reader (JsonReader)
The JsonReader that contains the JSON structure to reader values from.
target (Object)
The target object to populate values onto.


Populate Method (reader, target)

Populate Method (reader, target)
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Populate(TextReader, Object)
Populates the JSON values onto the target object.
Declaration Syntax
C# Visual Basic Visual C++
public void Populate(
    TextReader reader,
    Object target
)
Public Sub Populate ( _
    reader As TextReader, _
    target As Object _
)
public:
void Populate(
    TextReader^ reader,
    Object^ target
)
Parameters
reader (TextReader)
The TextReader that contains the JSON structure to reader values from.
target (Object)
The target object to populate values onto.


PreserveReferencesHandling Property

PreserveReferencesHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► PreserveReferencesHandling
Gets or sets how object references are preserved by the serializer.
Declaration Syntax
C# Visual Basic Visual C++
public virtual PreserveReferencesHandling PreserveReferencesHandling { get; set; }
Public Overridable Property PreserveReferencesHandling As PreserveReferencesHandling
    Get
    Set
public:
virtual property PreserveReferencesHandling PreserveReferencesHandling {
    PreserveReferencesHandling get ();
    void set (PreserveReferencesHandling value);
}


ReferenceLoopHandling Property

ReferenceLoopHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► ReferenceLoopHandling
Get or set how reference loops (e.g. a class referencing itself) is handled.
Declaration Syntax
C# Visual Basic Visual C++
public virtual ReferenceLoopHandling ReferenceLoopHandling { get; set; }
Public Overridable Property ReferenceLoopHandling As ReferenceLoopHandling
    Get
    Set
public:
virtual property ReferenceLoopHandling ReferenceLoopHandling {
    ReferenceLoopHandling get ();
    void set (ReferenceLoopHandling value);
}


ReferenceResolver Property

ReferenceResolver Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► ReferenceResolver
Gets or sets the IReferenceResolver used by the serializer when resolving references.
Declaration Syntax
C# Visual Basic Visual C++
public virtual IReferenceResolver ReferenceResolver { get; set; }
Public Overridable Property ReferenceResolver As IReferenceResolver
    Get
    Set
public:
virtual property IReferenceResolver^ ReferenceResolver {
    IReferenceResolver^ get ();
    void set (IReferenceResolver^ value);
}


Serialize Method

Serialize Method
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Serialize()()()()
Members
Icon | Member | Description
 | Serialize(TextWriter, Object) | Serializes the specified Object and writes the Json structure to a Stream using the specified TextWriter.
 | Serialize(JsonWriter, Object) | Serializes the specified Object and writes the Json structure to a Stream using the specified JsonWriter.


Serialize Method (jsonWriter, value)

Serialize Method (jsonWriter, value)
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Serialize(JsonWriter, Object)
Serializes the specified Object and writes the Json structure to a Stream using the specified JsonWriter.
Declaration Syntax
C# Visual Basic Visual C++
public void Serialize(
    JsonWriter jsonWriter,
    Object value
)
Public Sub Serialize ( _
    jsonWriter As JsonWriter, _
    value As Object _
)
public:
void Serialize(
    JsonWriter^ jsonWriter,
    Object^ value
)
Parameters
jsonWriter (JsonWriter)
The JsonWriter used to write the Json structure.
value (Object)
The Object to serialize.


Serialize Method (textWriter, value)

Serialize Method (textWriter, value)
Namespaces ► Newtonsoft.Json ► JsonSerializer ► Serialize(TextWriter, Object)
Serializes the specified Object and writes the Json structure to a Stream using the specified TextWriter.
Declaration Syntax
C# Visual Basic Visual C++
public void Serialize(
    TextWriter textWriter,
    Object value
)
Public Sub Serialize ( _
    textWriter As TextWriter, _
    value As Object _
)
public:
void Serialize(
    TextWriter^ textWriter,
    Object^ value
)
Parameters
textWriter (TextWriter)
The TextWriter used to write the Json structure.
value (Object)
The Object to serialize.


TypeNameAssemblyFormat Property

TypeNameAssemblyFormat Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► TypeNameAssemblyFormat
Gets or sets how a type name assembly is written and resolved by the serializer.
Declaration Syntax
C# Visual Basic Visual C++
public virtual FormatterAssemblyStyle TypeNameAssemblyFormat { get; set; }
Public Overridable Property TypeNameAssemblyFormat As FormatterAssemblyStyle
    Get
    Set
public:
virtual property FormatterAssemblyStyle TypeNameAssemblyFormat {
    FormatterAssemblyStyle get ();
    void set (FormatterAssemblyStyle value);
}
Value
The type name assembly format.


TypeNameHandling Property

TypeNameHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializer ► TypeNameHandling
Gets or sets how type name writing and reading is handled by the serializer.
Declaration Syntax
C# Visual Basic Visual C++
public virtual TypeNameHandling TypeNameHandling { get; set; }
Public Overridable Property TypeNameHandling As TypeNameHandling
    Get
    Set
public:
virtual property TypeNameHandling TypeNameHandling {
    TypeNameHandling get ();
    void set (TypeNameHandling value);
}


JsonSerializerSettings Class

JsonSerializerSettings Class
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings
Specifies the settings on a JsonSerializer object.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonSerializerSettings
Public Class JsonSerializerSettings
public ref class JsonSerializerSettings
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonSerializerSettings()()()() | Initializes a new instance of the JsonSerializerSettings class.
 | Binder | Gets or sets the SerializationBinder used by the serializer when resolving type names.
 | ConstructorHandling | Gets or sets how constructors are used during deserialization.
 | Context | Gets or sets the StreamingContext used by the serializer when invoking serialization callback methods.
 | ContractResolver | Gets or sets the contract resolver used by the serializer when serializing .NET objects to JSON and vice versa.
 | Converters | Gets or sets a collection JsonConverter that will be used during serialization.
 | DefaultValueHandling | Gets or sets how null default are handled during serialization and deserialization.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Error | Gets or sets the error handler called during serialization and deserialization.
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | MissingMemberHandling | Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
 | NullValueHandling | Gets or sets how null values are handled during serialization and deserialization.
 | ObjectCreationHandling | Gets or sets how objects are created during deserialization.
 | PreserveReferencesHandling | Gets or sets how object references are preserved by the serializer.
 | ReferenceLoopHandling | Gets or sets how reference loops (e.g. a class referencing itself) is handled.
 | ReferenceResolver | Gets or sets the IReferenceResolver used by the serializer when resolving references.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeNameAssemblyFormat | Gets or sets how a type name assembly is written and resolved by the serializer.
 | TypeNameHandling | Gets or sets how type name writing and reading is handled by the serializer.
Inheritance Hierarchy
Object
JsonSerializerSettings


JsonSerializerSettings Constructor

JsonSerializerSettings Constructor
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► JsonSerializerSettings()()()()
Initializes a new instance of the JsonSerializerSettings class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSerializerSettings()
Public Sub New
public:
JsonSerializerSettings()


Binder Property

Binder Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► Binder
Gets or sets the SerializationBinder used by the serializer when resolving type names.
Declaration Syntax
C# Visual Basic Visual C++
public SerializationBinder Binder { get; set; }
Public Property Binder As SerializationBinder
    Get
    Set
public:
property SerializationBinder^ Binder {
    SerializationBinder^ get ();
    void set (SerializationBinder^ value);
}
Value
The binder.


ConstructorHandling Property

ConstructorHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► ConstructorHandling
Gets or sets how constructors are used during deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public ConstructorHandling ConstructorHandling { get; set; }
Public Property ConstructorHandling As ConstructorHandling
    Get
    Set
public:
property ConstructorHandling ConstructorHandling {
    ConstructorHandling get ();
    void set (ConstructorHandling value);
}
Value
The constructor handling.


Context Property

Context Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► Context
Gets or sets the StreamingContext used by the serializer when invoking serialization callback methods.
Declaration Syntax
C# Visual Basic Visual C++
public StreamingContext Context { get; set; }
Public Property Context As StreamingContext
    Get
    Set
public:
property StreamingContext Context {
    StreamingContext get ();
    void set (StreamingContext value);
}
Value
The context.


ContractResolver Property

ContractResolver Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► ContractResolver
Gets or sets the contract resolver used by the serializer when serializing .NET objects to JSON and vice versa.
Declaration Syntax
C# Visual Basic Visual C++
public IContractResolver ContractResolver { get; set; }
Public Property ContractResolver As IContractResolver
    Get
    Set
public:
property IContractResolver^ ContractResolver {
    IContractResolver^ get ();
    void set (IContractResolver^ value);
}
Value
The contract resolver.


Converters Property

Converters Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► Converters
Gets or sets a collection JsonConverter that will be used during serialization.
Declaration Syntax
C# Visual Basic Visual C++
public IList<JsonConverter> Converters { get; set; }
Public Property Converters As IList(Of JsonConverter)
    Get
    Set
public:
property IList<JsonConverter^>^ Converters {
    IList<JsonConverter^>^ get ();
    void set (IList<JsonConverter^>^ value);
}
Value
The converters.


DefaultValueHandling Property

DefaultValueHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► DefaultValueHandling
Gets or sets how null default are handled during serialization and deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public DefaultValueHandling DefaultValueHandling { get; set; }
Public Property DefaultValueHandling As DefaultValueHandling
    Get
    Set
public:
property DefaultValueHandling DefaultValueHandling {
    DefaultValueHandling get ();
    void set (DefaultValueHandling value);
}
Value
The default value handling.


Error Property

Error Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► Error
Gets or sets the error handler called during serialization and deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public EventHandler<ErrorEventArgs> Error { get; set; }
Public Property Error As EventHandler(Of ErrorEventArgs)
    Get
    Set
public:
property EventHandler<ErrorEventArgs^>^ Error {
    EventHandler<ErrorEventArgs^>^ get ();
    void set (EventHandler<ErrorEventArgs^>^ value);
}
Value
The error handler called during serialization and deserialization.


MissingMemberHandling Property

MissingMemberHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► MissingMemberHandling
Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public MissingMemberHandling MissingMemberHandling { get; set; }
Public Property MissingMemberHandling As MissingMemberHandling
    Get
    Set
public:
property MissingMemberHandling MissingMemberHandling {
    MissingMemberHandling get ();
    void set (MissingMemberHandling value);
}
Value
Missing member handling.


NullValueHandling Property

NullValueHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► NullValueHandling
Gets or sets how null values are handled during serialization and deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public NullValueHandling NullValueHandling { get; set; }
Public Property NullValueHandling As NullValueHandling
    Get
    Set
public:
property NullValueHandling NullValueHandling {
    NullValueHandling get ();
    void set (NullValueHandling value);
}
Value
Null value handling.


ObjectCreationHandling Property

ObjectCreationHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► ObjectCreationHandling
Gets or sets how objects are created during deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public ObjectCreationHandling ObjectCreationHandling { get; set; }
Public Property ObjectCreationHandling As ObjectCreationHandling
    Get
    Set
public:
property ObjectCreationHandling ObjectCreationHandling {
    ObjectCreationHandling get ();
    void set (ObjectCreationHandling value);
}
Value
The object creation handling.


PreserveReferencesHandling Property

PreserveReferencesHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► PreserveReferencesHandling
Gets or sets how object references are preserved by the serializer.
Declaration Syntax
C# Visual Basic Visual C++
public PreserveReferencesHandling PreserveReferencesHandling { get; set; }
Public Property PreserveReferencesHandling As PreserveReferencesHandling
    Get
    Set
public:
property PreserveReferencesHandling PreserveReferencesHandling {
    PreserveReferencesHandling get ();
    void set (PreserveReferencesHandling value);
}
Value
The preserve references handling.


ReferenceLoopHandling Property

ReferenceLoopHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► ReferenceLoopHandling
Gets or sets how reference loops (e.g. a class referencing itself) is handled.
Declaration Syntax
C# Visual Basic Visual C++
public ReferenceLoopHandling ReferenceLoopHandling { get; set; }
Public Property ReferenceLoopHandling As ReferenceLoopHandling
    Get
    Set
public:
property ReferenceLoopHandling ReferenceLoopHandling {
    ReferenceLoopHandling get ();
    void set (ReferenceLoopHandling value);
}
Value
Reference loop handling.


ReferenceResolver Property

ReferenceResolver Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► ReferenceResolver
Gets or sets the IReferenceResolver used by the serializer when resolving references.
Declaration Syntax
C# Visual Basic Visual C++
public IReferenceResolver ReferenceResolver { get; set; }
Public Property ReferenceResolver As IReferenceResolver
    Get
    Set
public:
property IReferenceResolver^ ReferenceResolver {
    IReferenceResolver^ get ();
    void set (IReferenceResolver^ value);
}
Value
The reference resolver.


TypeNameAssemblyFormat Property

TypeNameAssemblyFormat Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► TypeNameAssemblyFormat
Gets or sets how a type name assembly is written and resolved by the serializer.
Declaration Syntax
C# Visual Basic Visual C++
public FormatterAssemblyStyle TypeNameAssemblyFormat { get; set; }
Public Property TypeNameAssemblyFormat As FormatterAssemblyStyle
    Get
    Set
public:
property FormatterAssemblyStyle TypeNameAssemblyFormat {
    FormatterAssemblyStyle get ();
    void set (FormatterAssemblyStyle value);
}
Value
The type name assembly format.


TypeNameHandling Property

TypeNameHandling Property
Namespaces ► Newtonsoft.Json ► JsonSerializerSettings ► TypeNameHandling
Gets or sets how type name writing and reading is handled by the serializer.
Declaration Syntax
C# Visual Basic Visual C++
public TypeNameHandling TypeNameHandling { get; set; }
Public Property TypeNameHandling As TypeNameHandling
    Get
    Set
public:
property TypeNameHandling TypeNameHandling {
    TypeNameHandling get ();
    void set (TypeNameHandling value);
}
Value
The type name handling.


JsonTextReader Class

JsonTextReader Class
Namespaces ► Newtonsoft.Json ► JsonTextReader
Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonTextReader : JsonReader,
    IJsonLineInfo
Public Class JsonTextReader _
    Inherits JsonReader _
    Implements IJsonLineInfo
public ref class JsonTextReader : public JsonReader,
    IJsonLineInfo
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonTextReader(TextReader) | Initializes a new instance of the JsonReader class with the specified TextReader.
 | Close()()()() | Changes the state to closed. (Overrides JsonReader.Close()()()().)
 | CloseInput | Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed. (Inherited from JsonReader.)
 | CurrentState | Gets the current reader state. (Inherited from JsonReader.)
 | Depth | Gets the depth of the current token in the JSON document. (Inherited from JsonReader.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from JsonReader.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HasLineInfo()()()() | Gets a value indicating whether the class can return line information.
 | LineNumber | Gets the current line number.
 | LinePosition | Gets the current line position.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | QuoteChar | Gets the quotation mark character used to enclose the value of a string. (Inherited from JsonReader.)
 | Read()()()() | Reads the next JSON token from the stream. (Overrides JsonReader.Read()()()().)
 | ReadAsBytes()()()() | Reads the next JSON token from the stream as a array<Byte>[]()[][]. (Overrides JsonReader.ReadAsBytes()()()().)
 | ReadAsDateTimeOffset()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>. (Overrides JsonReader.ReadAsDateTimeOffset()()()().)
 | ReadAsDecimal()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>. (Overrides JsonReader.ReadAsDecimal()()()().)
 | SetStateBasedOnCurrent()()()() | Sets the state based on current token type. (Inherited from JsonReader.)
 | SetToken(JsonToken) | Sets the current token. (Inherited from JsonReader.)
 | SetToken(JsonToken, Object) | Sets the current token and value. (Inherited from JsonReader.)
 | Skip()()()() | Skips the children of the current token. (Inherited from JsonReader.)
 | TokenType | Gets the type of the current Json token. (Inherited from JsonReader.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Value | Gets the text value of the current Json token. (Inherited from JsonReader.)
 | ValueType | Gets The Common Language Runtime (CLR) type for the current Json token. (Inherited from JsonReader.)
Inheritance Hierarchy
Object
 | JsonReader
 |  | JsonTextReader


JsonTextReader Constructor (reader)

JsonTextReader Constructor (reader)
Namespaces ► Newtonsoft.Json ► JsonTextReader ► JsonTextReader(TextReader)
Initializes a new instance of the JsonReader class with the specified TextReader.
Declaration Syntax
C# Visual Basic Visual C++
public JsonTextReader(
    TextReader reader
)
Public Sub New ( _
    reader As TextReader _
)
public:
JsonTextReader(
    TextReader^ reader
)
Parameters
reader (TextReader)
The TextReader containing the XML data to read.


Close Method

Close Method
Namespaces ► Newtonsoft.Json ► JsonTextReader ► Close()()()()
Changes the state to closed.
Declaration Syntax
C# Visual Basic Visual C++
public override void Close()
Public Overrides Sub Close
public:
virtual void Close() override


HasLineInfo Method

HasLineInfo Method
Namespaces ► Newtonsoft.Json ► JsonTextReader ► HasLineInfo()()()()
Gets a value indicating whether the class can return line information.
Declaration Syntax
C# Visual Basic Visual C++
public bool HasLineInfo()
Public Function HasLineInfo As Boolean
public:
virtual bool HasLineInfo() sealed
Return Value
true if LineNumber and LinePosition can be provided; otherwise, false.


LineNumber Property

LineNumber Property
Namespaces ► Newtonsoft.Json ► JsonTextReader ► LineNumber
Gets the current line number.
Declaration Syntax
C# Visual Basic Visual C++
public int LineNumber { get; }
Public ReadOnly Property LineNumber As Integer
    Get
public:
virtual property int LineNumber {
    int get () sealed;
}
Value
The current line number or 0 if no line information is available (for example, HasLineInfo returns false).


LinePosition Property

LinePosition Property
Namespaces ► Newtonsoft.Json ► JsonTextReader ► LinePosition
Gets the current line position.
Declaration Syntax
C# Visual Basic Visual C++
public int LinePosition { get; }
Public ReadOnly Property LinePosition As Integer
    Get
public:
virtual property int LinePosition {
    int get () sealed;
}
Value
The current line position or 0 if no line information is available (for example, HasLineInfo returns false).


Read Method

Read Method
Namespaces ► Newtonsoft.Json ► JsonTextReader ► Read()()()()
Reads the next JSON token from the stream.
Declaration Syntax
C# Visual Basic Visual C++
public override bool Read()
Public Overrides Function Read As Boolean
public:
virtual bool Read() override
Return Value
true if the next token was read successfully; false if there are no more tokens to read.


ReadAsBytes Method

ReadAsBytes Method
Namespaces ► Newtonsoft.Json ► JsonTextReader ► ReadAsBytes()()()()
Reads the next JSON token from the stream as a array<Byte>[]()[][].
Declaration Syntax
C# Visual Basic Visual C++
public override byte[] ReadAsBytes()
Public Overrides Function ReadAsBytes As Byte()
public:
virtual array<unsigned char>^ ReadAsBytes() override
Return Value
A array<Byte>[]()[][] or a null reference if the next JSON token is null.


ReadAsDateTimeOffset Method

ReadAsDateTimeOffset Method
Namespaces ► Newtonsoft.Json ► JsonTextReader ► ReadAsDateTimeOffset()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public override Nullable<DateTimeOffset> ReadAsDateTimeOffset()
Public Overrides Function ReadAsDateTimeOffset As Nullable(Of DateTimeOffset)
public:
virtual Nullable<DateTimeOffset> ReadAsDateTimeOffset() override
Return Value
A DateTimeOffset.


ReadAsDecimal Method

ReadAsDecimal Method
Namespaces ► Newtonsoft.Json ► JsonTextReader ► ReadAsDecimal()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public override Nullable<decimal> ReadAsDecimal()
Public Overrides Function ReadAsDecimal As Nullable(Of Decimal)
public:
virtual Nullable<Decimal> ReadAsDecimal() override
Return Value
A Nullable<(Of <(<'T>)>)>.


JsonTextWriter Class

JsonTextWriter Class
Namespaces ► Newtonsoft.Json ► JsonTextWriter
Represents a writer that provides a fast, non-cached, forward-only way of generating Json data.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonTextWriter : JsonWriter
Public Class JsonTextWriter _
    Inherits JsonWriter
public ref class JsonTextWriter : public JsonWriter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon Member Description
JsonTextWriter(TextWriter)
Creates an instance of the JsonWriter class using the specified TextWriter.

Close()()()()
Closes this stream and the underlying stream.
(Overrides JsonWriter.Close()()()().)
CloseOutput
Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the writer is closed.
(Inherited from JsonWriter.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Flush()()()()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
(Overrides JsonWriter.Flush()()()().)
Formatting
Indicates how the output is formatted.
(Inherited from JsonWriter.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Indentation
Gets or sets how many IndentChars to write for each level in the hierarchy when Formatting is set to Formatting.Indented.

IndentChar
Gets or sets which character to use for indenting when Formatting is set to Formatting.Indented.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
QuoteChar
Gets or sets which character to use to quote attribute values.

QuoteName
Gets or sets a value indicating whether object names will be surrounded with quotes.

Top
Gets the top.
(Inherited from JsonWriter.)
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
WriteComment(String)
Writes out a comment
CopyC#
/*...*/
 containing the specified text.
(Overrides JsonWriter.WriteComment(String).)
WriteEnd(JsonToken)
Writes the specified end token.
(Overrides JsonWriter.WriteEnd(JsonToken).)
WriteEnd()()()()
Writes the end of the current Json object or array.
(Inherited from JsonWriter.)
WriteEndArray()()()()
Writes the end of an array.
(Inherited from JsonWriter.)
WriteEndConstructor()()()()
Writes the end constructor.
(Inherited from JsonWriter.)
WriteEndObject()()()()
Writes the end of a Json object.
(Inherited from JsonWriter.)
WriteIndent()()()()
Writes indent characters.
(Overrides JsonWriter.WriteIndent()()()().)
WriteIndentSpace()()()()
Writes an indent space.
(Overrides JsonWriter.WriteIndentSpace()()()().)
WriteNull()()()()
Writes a null value.
(Overrides JsonWriter.WriteNull()()()().)
WritePropertyName(String)
Writes the property name of a name/value pair on a Json object.
(Overrides JsonWriter.WritePropertyName(String).)
WriteRaw(String)
Writes raw JSON.
(Overrides JsonWriter.WriteRaw(String).)
WriteRawValue(String)
Writes raw JSON where a value is expected and updates the writer's state.
(Inherited from JsonWriter.)
WriteStartArray()()()()
Writes the beginning of a Json array.
(Overrides JsonWriter.WriteStartArray()()()().)
WriteStartConstructor(String)
Writes the start of a constructor with the given name.
(Overrides JsonWriter.WriteStartConstructor(String).)
WriteStartObject()()()()
Writes the beginning of a Json object.
(Overrides JsonWriter.WriteStartObject()()()().)
WriteState
Gets the state of the writer.
(Inherited from JsonWriter.)
WriteToken(JsonReader)
Writes the current JsonReader token.
(Inherited from JsonWriter.)
WriteUndefined()()()()
Writes an undefined value.
(Overrides JsonWriter.WriteUndefined()()()().)
WriteValue(String)
Writes a String value.
(Overrides JsonWriter.WriteValue(String).)
WriteValue(Int32)
Writes a Int32 value.
(Overrides JsonWriter.WriteValue(Int32).)
WriteValue(UInt32)
Writes a UInt32 value.
(Overrides JsonWriter.WriteValue(UInt32).)
WriteValue(Int64)
Writes a Int64 value.
(Overrides JsonWriter.WriteValue(Int64).)
WriteValue(UInt64)
Writes a UInt64 value.
(Overrides JsonWriter.WriteValue(UInt64).)
WriteValue(Single)
Writes a Single value.
(Overrides JsonWriter.WriteValue(Single).)
WriteValue(Double)
Writes a Double value.
(Overrides JsonWriter.WriteValue(Double).)
WriteValue(Boolean)
Writes a Boolean value.
(Overrides JsonWriter.WriteValue(Boolean).)
WriteValue(Int16)
Writes a Int16 value.
(Overrides JsonWriter.WriteValue(Int16).)
WriteValue(UInt16)
Writes a UInt16 value.
(Overrides JsonWriter.WriteValue(UInt16).)
WriteValue(Char)
Writes a Char value.
(Overrides JsonWriter.WriteValue(Char).)
WriteValue(Byte)
Writes a Byte value.
(Overrides JsonWriter.WriteValue(Byte).)
WriteValue(SByte)
Writes a SByte value.
(Overrides JsonWriter.WriteValue(SByte).)
WriteValue(Decimal)
Writes a Decimal value.
(Overrides JsonWriter.WriteValue(Decimal).)
WriteValue(DateTime)
Writes a DateTime value.
(Overrides JsonWriter.WriteValue(DateTime).)
WriteValue(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value.
(Overrides JsonWriter.WriteValue(array<Byte>[]()[][]).)
WriteValue(DateTimeOffset)
Writes a DateTimeOffset value.
(Overrides JsonWriter.WriteValue(DateTimeOffset).)
WriteValue(Nullable<(Of <<'(Int32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Int64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Single>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Double>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Boolean>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Int16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Char>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Byte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(SByte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Decimal>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(DateTime>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Object)
Writes a Object value. An error will raised if the value cannot be written as a single JSON token.
(Inherited from JsonWriter.)
WriteValueDelimiter()()()()
Writes the JSON value delimiter.
(Overrides JsonWriter.WriteValueDelimiter()()()().)
WriteWhitespace(String)
Writes out the given white space.
(Overrides JsonWriter.WriteWhitespace(String).)
Inheritance Hierarchy
Object
 | JsonWriter
 |  | JsonTextWriter


JsonTextWriter Constructor (textWriter)

JsonTextWriter Constructor (textWriter)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► JsonTextWriter(TextWriter)
Creates an instance of the JsonWriter class using the specified TextWriter.
Declaration Syntax
C# Visual Basic Visual C++
public JsonTextWriter(
    TextWriter textWriter
)
Public Sub New ( _
    textWriter As TextWriter _
)
public:
JsonTextWriter(
    TextWriter^ textWriter
)
Parameters
textWriter (TextWriter)
The TextWriter to write to.


Close Method

Close Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► Close()()()()
Closes this stream and the underlying stream.
Declaration Syntax
C# Visual Basic Visual C++
public override void Close()
Public Overrides Sub Close
public:
virtual void Close() override


Flush Method

Flush Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► Flush()()()()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
Declaration Syntax
C# Visual Basic Visual C++
public override void Flush()
Public Overrides Sub Flush
public:
virtual void Flush() override


Indentation Property

Indentation Property
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► Indentation
Gets or sets how many IndentChars to write for each level in the hierarchy when Formatting is set to Formatting.Indented.
Declaration Syntax
C# Visual Basic Visual C++
public int Indentation { get; set; }
Public Property Indentation As Integer
    Get
    Set
public:
property int Indentation {
    int get ();
    void set (int value);
}


IndentChar Property

IndentChar Property
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► IndentChar
Gets or sets which character to use for indenting when Formatting is set to Formatting.Indented.
Declaration Syntax
C# Visual Basic Visual C++
public char IndentChar { get; set; }
Public Property IndentChar As Char
    Get
    Set
public:
property wchar_t IndentChar {
    wchar_t get ();
    void set (wchar_t value);
}


QuoteChar Property

QuoteChar Property
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► QuoteChar
Gets or sets which character to use to quote attribute values.
Declaration Syntax
C# Visual Basic Visual C++
public char QuoteChar { get; set; }
Public Property QuoteChar As Char
    Get
    Set
public:
property wchar_t QuoteChar {
    wchar_t get ();
    void set (wchar_t value);
}


QuoteName Property

QuoteName Property
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► QuoteName
Gets or sets a value indicating whether object names will be surrounded with quotes.
Declaration Syntax
C# Visual Basic Visual C++
public bool QuoteName { get; set; }
Public Property QuoteName As Boolean
    Get
    Set
public:
property bool QuoteName {
    bool get ();
    void set (bool value);
}


WriteComment Method (text)

WriteComment Method (text)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteComment(String)
Writes out a comment
CopyC#
/*...*/
 containing the specified text.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteComment(
    string text
)
Public Overrides Sub WriteComment ( _
    text As String _
)
public:
virtual void WriteComment(
    String^ text
) override
Parameters
text (String)
Text to place inside the comment.


WriteEnd Method (token)

WriteEnd Method (token)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteEnd(JsonToken)
Writes the specified end token.
Declaration Syntax
C# Visual Basic Visual C++
protected override void WriteEnd(
    JsonToken token
)
Protected Overrides Sub WriteEnd ( _
    token As JsonToken _
)
protected:
virtual void WriteEnd(
    JsonToken token
) override
Parameters
token (JsonToken)
The end token to write.


WriteIndent Method

WriteIndent Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteIndent()()()()
Writes indent characters.
Declaration Syntax
C# Visual Basic Visual C++
protected override void WriteIndent()
Protected Overrides Sub WriteIndent
protected:
virtual void WriteIndent() override


WriteIndentSpace Method

WriteIndentSpace Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteIndentSpace()()()()
Writes an indent space.
Declaration Syntax
C# Visual Basic Visual C++
protected override void WriteIndentSpace()
Protected Overrides Sub WriteIndentSpace
protected:
virtual void WriteIndentSpace() override


WriteNull Method

WriteNull Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteNull()()()()
Writes a null value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteNull()
Public Overrides Sub WriteNull
public:
virtual void WriteNull() override


WritePropertyName Method (name)

WritePropertyName Method (name)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WritePropertyName(String)
Writes the property name of a name/value pair on a Json object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WritePropertyName(
    string name
)
Public Overrides Sub WritePropertyName ( _
    name As String _
)
public:
virtual void WritePropertyName(
    String^ name
) override
Parameters
name (String)
The name of the property.


WriteRaw Method (json)

WriteRaw Method (json)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteRaw(String)
Writes raw JSON.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteRaw(
    string json
)
Public Overrides Sub WriteRaw ( _
    json As String _
)
public:
virtual void WriteRaw(
    String^ json
) override
Parameters
json (String)
The raw JSON to write.


WriteStartArray Method

WriteStartArray Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteStartArray()()()()
Writes the beginning of a Json array.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteStartArray()
Public Overrides Sub WriteStartArray
public:
virtual void WriteStartArray() override


WriteStartConstructor Method (name)

WriteStartConstructor Method (name)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteStartConstructor(String)
Writes the start of a constructor with the given name.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteStartConstructor(
    string name
)
Public Overrides Sub WriteStartConstructor ( _
    name As String _
)
public:
virtual void WriteStartConstructor(
    String^ name
) override
Parameters
name (String)
The name of the constructor.


WriteStartObject Method

WriteStartObject Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteStartObject()()()()
Writes the beginning of a Json object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteStartObject()
Public Overrides Sub WriteStartObject
public:
virtual void WriteStartObject() override


WriteUndefined Method

WriteUndefined Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteUndefined()()()()
Writes an undefined value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteUndefined()
Public Overrides Sub WriteUndefined
public:
virtual void WriteUndefined() override


WriteValue Method

WriteValue Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue()()()()
Members
Icon | Member | Description
 | WriteValue(String) | Writes a String value. (Overrides JsonWriter.WriteValue(String).)
 | WriteValue(Int32) | Writes a Int32 value. (Overrides JsonWriter.WriteValue(Int32).)
 | WriteValue(UInt32) | Writes a UInt32 value. (Overrides JsonWriter.WriteValue(UInt32).)
 | WriteValue(Int64) | Writes a Int64 value. (Overrides JsonWriter.WriteValue(Int64).)
 | WriteValue(UInt64) | Writes a UInt64 value. (Overrides JsonWriter.WriteValue(UInt64).)
 | WriteValue(Single) | Writes a Single value. (Overrides JsonWriter.WriteValue(Single).)
 | WriteValue(Double) | Writes a Double value. (Overrides JsonWriter.WriteValue(Double).)
 | WriteValue(Boolean) | Writes a Boolean value. (Overrides JsonWriter.WriteValue(Boolean).)
 | WriteValue(Int16) | Writes a Int16 value. (Overrides JsonWriter.WriteValue(Int16).)
 | WriteValue(UInt16) | Writes a UInt16 value. (Overrides JsonWriter.WriteValue(UInt16).)
 | WriteValue(Char) | Writes a Char value. (Overrides JsonWriter.WriteValue(Char).)
 | WriteValue(Byte) | Writes a Byte value. (Overrides JsonWriter.WriteValue(Byte).)
 | WriteValue(SByte) | Writes a SByte value. (Overrides JsonWriter.WriteValue(SByte).)
 | WriteValue(Decimal) | Writes a Decimal value. (Overrides JsonWriter.WriteValue(Decimal).)
 | WriteValue(DateTime) | Writes a DateTime value. (Overrides JsonWriter.WriteValue(DateTime).)
 | WriteValue(array<Byte>[]()[][]) | Writes a array<Byte>[]()[][] value. (Overrides JsonWriter.WriteValue(array<Byte>[]()[][]).)
 | WriteValue(DateTimeOffset) | Writes a DateTimeOffset value. (Overrides JsonWriter.WriteValue(DateTimeOffset).)
 | WriteValue(Nullable<(Of <<'(Int32>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt32>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Int64>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt64>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Single>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Double>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Boolean>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Int16>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt16>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Char>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Byte>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(SByte>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Decimal>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(DateTime>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Object) | Writes a Object value. An error will raised if the value cannot be written as a single JSON token.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(Boolean)
Writes a Boolean value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    bool value
)
Public Overrides Sub WriteValue ( _
    value As Boolean _
)
public:
virtual void WriteValue(
    bool value
) override
Parameters
value (Boolean)
The Boolean value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(Byte)
Writes a Byte value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    byte value
)
Public Overrides Sub WriteValue ( _
    value As Byte _
)
public:
virtual void WriteValue(
    unsigned char value
) override
Parameters
value (Byte)
The Byte value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    byte[] value
)
Public Overrides Sub WriteValue ( _
    value As Byte() _
)
public:
virtual void WriteValue(
    array<unsigned char>^ value
) override
Parameters
value (array< Byte >[]()[][])
The array<Byte>[]()[][] value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(Char)
Writes a Char value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    char value
)
Public Overrides Sub WriteValue ( _
    value As Char _
)
public:
virtual void WriteValue(
    wchar_t value
) override
Parameters
value (Char)
The Char value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(DateTime)
Writes a DateTime value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    DateTime value
)
Public Overrides Sub WriteValue ( _
    value As DateTime _
)
public:
virtual void WriteValue(
    DateTime value
) override
Parameters
value (DateTime)
The DateTime value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(DateTimeOffset)
Writes a DateTimeOffset value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    DateTimeOffset value
)
Public Overrides Sub WriteValue ( _
    value As DateTimeOffset _
)
public:
virtual void WriteValue(
    DateTimeOffset value
) override
Parameters
value (DateTimeOffset)
The DateTimeOffset value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(Decimal)
Writes a Decimal value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    decimal value
)
Public Overrides Sub WriteValue ( _
    value As Decimal _
)
public:
virtual void WriteValue(
    Decimal value
) override
Parameters
value (Decimal)
The Decimal value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(Double)
Writes a Double value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    double value
)
Public Overrides Sub WriteValue ( _
    value As Double _
)
public:
virtual void WriteValue(
    double value
) override
Parameters
value (Double)
The Double value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(Int16)
Writes a Int16 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    short value
)
Public Overrides Sub WriteValue ( _
    value As Short _
)
public:
virtual void WriteValue(
    short value
) override
Parameters
value (Int16)
The Int16 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(Int32)
Writes a Int32 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    int value
)
Public Overrides Sub WriteValue ( _
    value As Integer _
)
public:
virtual void WriteValue(
    int value
) override
Parameters
value (Int32)
The Int32 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(Int64)
Writes a Int64 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    long value
)
Public Overrides Sub WriteValue ( _
    value As Long _
)
public:
virtual void WriteValue(
    long long value
) override
Parameters
value (Int64)
The Int64 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(SByte)
Writes a SByte value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    sbyte value
)
Public Overrides Sub WriteValue ( _
    value As SByte _
)
public:
virtual void WriteValue(
    signed char value
) override
Parameters
value (SByte)
The SByte value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(Single)
Writes a Single value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    float value
)
Public Overrides Sub WriteValue ( _
    value As Single _
)
public:
virtual void WriteValue(
    float value
) override
Parameters
value (Single)
The Single value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(String)
Writes a String value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    string value
)
Public Overrides Sub WriteValue ( _
    value As String _
)
public:
virtual void WriteValue(
    String^ value
) override
Parameters
value (String)
The String value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(UInt16)
Writes a UInt16 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    ushort value
)
Public Overrides Sub WriteValue ( _
    value As UShort _
)
public:
virtual void WriteValue(
    unsigned short value
) override
Parameters
value (UInt16)
The UInt16 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(UInt32)
Writes a UInt32 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    uint value
)
Public Overrides Sub WriteValue ( _
    value As UInteger _
)
public:
virtual void WriteValue(
    unsigned int value
) override
Parameters
value (UInt32)
The UInt32 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValue(UInt64)
Writes a UInt64 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    ulong value
)
Public Overrides Sub WriteValue ( _
    value As ULong _
)
public:
virtual void WriteValue(
    unsigned long long value
) override
Parameters
value (UInt64)
The UInt64 value to write.


WriteValueDelimiter Method

WriteValueDelimiter Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteValueDelimiter()()()()
Writes the JSON value delimiter.
Declaration Syntax
C# Visual Basic Visual C++
protected override void WriteValueDelimiter()
Protected Overrides Sub WriteValueDelimiter
protected:
virtual void WriteValueDelimiter() override


WriteWhitespace Method (ws)

WriteWhitespace Method (ws)
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteWhitespace(String)
Writes out the given white space.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteWhitespace(
    string ws
)
Public Overrides Sub WriteWhitespace ( _
    ws As String _
)
public:
virtual void WriteWhitespace(
    String^ ws
) override
Parameters
ws (String)
The string of white space characters.


JsonToken Enumeration

JsonToken Enumeration
Namespaces ► Newtonsoft.Json ► JsonToken
Specifies the type of Json token.
Declaration Syntax
C# Visual Basic Visual C++
public enum JsonToken
Public Enumeration JsonToken
public enum class JsonToken
Members
Member | Description
None | This is returned by the JsonReader if a Read()()()() method has not been called.
StartObject | An object start token.
StartArray | An array start token.
StartConstructor | A constructor start token.
PropertyName | An object property name.
Comment | A comment.
Raw | Raw JSON.
Integer | An interger.
Float | A float.
String | A string.
Boolean | A boolean.
Null | A null token.
Undefined | An undefined token.
EndObject | An object end token.
EndArray | An array end token.
EndConstructor | A constructor end token.
Date | A Date.
Bytes | Byte data.


JsonValidatingReader Class

JsonValidatingReader Class
Namespaces ► Newtonsoft.Json ► JsonValidatingReader
Represents a reader that provides JsonSchema validation.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonValidatingReader : JsonReader,
    IJsonLineInfo
Public Class JsonValidatingReader _
    Inherits JsonReader _
    Implements IJsonLineInfo
public ref class JsonValidatingReader : public JsonReader,
    IJsonLineInfo
Members
All Members | Constructors | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonValidatingReader(JsonReader) | Initializes a new instance of the JsonValidatingReader class that validates the content returned from the given JsonReader.
 | Close()()()() | Changes the JsonReader..::..State to Closed. (Inherited from JsonReader.)
 | CloseInput | Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed. (Inherited from JsonReader.)
 | CurrentState | Gets the current reader state. (Inherited from JsonReader.)
 | Depth | Gets the depth of the current token in the JSON document. (Overrides JsonReader.Depth.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from JsonReader.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | QuoteChar | Gets the quotation mark character used to enclose the value of a string. (Overrides JsonReader.QuoteChar.)
 | Read()()()() | Reads the next JSON token from the stream. (Overrides JsonReader.Read()()()().)
 | ReadAsBytes()()()() | Reads the next JSON token from the stream as a array<Byte>[]()[][]. (Overrides JsonReader.ReadAsBytes()()()().)
 | ReadAsDateTimeOffset()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>. (Overrides JsonReader.ReadAsDateTimeOffset()()()().)
 | ReadAsDecimal()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>. (Overrides JsonReader.ReadAsDecimal()()()().)
 | Reader | Gets the JsonReader used to construct this JsonValidatingReader.
 | Schema | Gets or sets the schema.
 | SetStateBasedOnCurrent()()()() | Sets the state based on current token type. (Inherited from JsonReader.)
 | SetToken(JsonToken) | Sets the current token. (Inherited from JsonReader.)
 | SetToken(JsonToken, Object) | Sets the current token and value. (Inherited from JsonReader.)
 | Skip()()()() | Skips the children of the current token. (Inherited from JsonReader.)
 | TokenType | Gets the type of the current Json token. (Overrides JsonReader.TokenType.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | ValidationEventHandler | Sets an event handler for receiving schema validation errors.
 | Value | Gets the text value of the current Json token. (Overrides JsonReader.Value.)
 | ValueType | Gets The Common Language Runtime (CLR) type for the current Json token. (Overrides JsonReader.ValueType.)
Inheritance Hierarchy
Object
 | JsonReader
 |  | JsonValidatingReader


JsonValidatingReader Constructor (reader)

JsonValidatingReader Constructor (reader)
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► JsonValidatingReader(JsonReader)
Initializes a new instance of the JsonValidatingReader class that validates the content returned from the given JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public JsonValidatingReader(
    JsonReader reader
)
Public Sub New ( _
    reader As JsonReader _
)
public:
JsonValidatingReader(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
The JsonReader to read from while validating.


Depth Property

Depth Property
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► Depth
Gets the depth of the current token in the JSON document.
Declaration Syntax
C# Visual Basic Visual C++
public override int Depth { get; }
Public Overrides ReadOnly Property Depth As Integer
    Get
public:
virtual property int Depth {
    int get () override;
}
Value
The depth of the current token in the JSON document.


QuoteChar Property

QuoteChar Property
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► QuoteChar
Gets the quotation mark character used to enclose the value of a string.
Declaration Syntax
C# Visual Basic Visual C++
public override char QuoteChar { get; protected internal set; }
Public Overrides Property QuoteChar As Char
    Get
    Protected Friend Set
public:
virtual property wchar_t QuoteChar {
    wchar_t get () override;
    protected public: void set (wchar_t value) override;
}
Value


Read Method

Read Method
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► Read()()()()
Reads the next JSON token from the stream.
Declaration Syntax
C# Visual Basic Visual C++
public override bool Read()
Public Overrides Function Read As Boolean
public:
virtual bool Read() override
Return Value
true if the next token was read successfully; false if there are no more tokens to read.


ReadAsBytes Method

ReadAsBytes Method
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► ReadAsBytes()()()()
Reads the next JSON token from the stream as a array<Byte>[]()[][].
Declaration Syntax
C# Visual Basic Visual C++
public override byte[] ReadAsBytes()
Public Overrides Function ReadAsBytes As Byte()
public:
virtual array<unsigned char>^ ReadAsBytes() override
Return Value
A array<Byte>[]()[][] or a null reference if the next JSON token is null.


ReadAsDateTimeOffset Method

ReadAsDateTimeOffset Method
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► ReadAsDateTimeOffset()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public override Nullable<DateTimeOffset> ReadAsDateTimeOffset()
Public Overrides Function ReadAsDateTimeOffset As Nullable(Of DateTimeOffset)
public:
virtual Nullable<DateTimeOffset> ReadAsDateTimeOffset() override
Return Value
A Nullable<(Of <(<'T>)>)>.


ReadAsDecimal Method

ReadAsDecimal Method
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► ReadAsDecimal()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public override Nullable<decimal> ReadAsDecimal()
Public Overrides Function ReadAsDecimal As Nullable(Of Decimal)
public:
virtual Nullable<Decimal> ReadAsDecimal() override
Return Value
A Nullable<(Of <(<'T>)>)>.


Reader Property

Reader Property
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► Reader
Gets the JsonReader used to construct this JsonValidatingReader.
Declaration Syntax
C# Visual Basic Visual C++
public JsonReader Reader { get; }
Public ReadOnly Property Reader As JsonReader
    Get
public:
property JsonReader^ Reader {
    JsonReader^ get ();
}
Value
The JsonReader specified in the constructor.


Schema Property

Schema Property
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► Schema
Gets or sets the schema.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchema Schema { get; set; }
Public Property Schema As JsonSchema
    Get
    Set
public:
property JsonSchema^ Schema {
    JsonSchema^ get ();
    void set (JsonSchema^ value);
}
Value
The schema.


TokenType Property

TokenType Property
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► TokenType
Gets the type of the current Json token.
Declaration Syntax
C# Visual Basic Visual C++
public override JsonToken TokenType { get; }
Public Overrides ReadOnly Property TokenType As JsonToken
    Get
public:
virtual property JsonToken TokenType {
    JsonToken get () override;
}
Value


ValidationEventHandler Event

ValidationEventHandler Event
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► ValidationEventHandler
Sets an event handler for receiving schema validation errors.
Declaration Syntax
C# Visual Basic Visual C++
public event ValidationEventHandler ValidationEventHandler
Public Event ValidationEventHandler As ValidationEventHandler
public:
 event ValidationEventHandler^ ValidationEventHandler {
    void add (ValidationEventHandler^ value);
    void remove (ValidationEventHandler^ value);
}


Value Property

Value Property
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► Value
Gets the text value of the current Json token.
Declaration Syntax
C# Visual Basic Visual C++
public override Object Value { get; }
Public Overrides ReadOnly Property Value As Object
    Get
public:
virtual property Object^ Value {
    Object^ get () override;
}
Value


ValueType Property

ValueType Property
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► ValueType
Gets The Common Language Runtime (CLR) type for the current Json token.
Declaration Syntax
C# Visual Basic Visual C++
public override Type ValueType { get; }
Public Overrides ReadOnly Property ValueType As Type
    Get
public:
virtual property Type^ ValueType {
    Type^ get () override;
}
Value


JsonWriter Class

JsonWriter Class
Namespaces ► Newtonsoft.Json ► JsonWriter
Represents a writer that provides a fast, non-cached, forward-only way of generating Json data.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class JsonWriter : IDisposable
Public MustInherit Class JsonWriter _
    Implements IDisposable
public ref class JsonWriter abstract : IDisposable
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon Member Description
JsonWriter()()()()
Creates an instance of the JsonWriter class.

Close()()()()
Closes this stream and the underlying stream.

CloseOutput
Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the writer is closed.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Flush()()()()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.

Formatting
Indicates how the output is formatted.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Top
Gets the top.

ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
WriteComment(String)
Writes out a comment
CopyC#
/*...*/
 containing the specified text.

WriteEnd()()()()
Writes the end of the current Json object or array.

WriteEnd(JsonToken)
Writes the specified end token.

WriteEndArray()()()()
Writes the end of an array.

WriteEndConstructor()()()()
Writes the end constructor.

WriteEndObject()()()()
Writes the end of a Json object.

WriteIndent()()()()
Writes indent characters.

WriteIndentSpace()()()()
Writes an indent space.

WriteNull()()()()
Writes a null value.

WritePropertyName(String)
Writes the property name of a name/value pair on a Json object.

WriteRaw(String)
Writes raw JSON without changing the writer's state.

WriteRawValue(String)
Writes raw JSON where a value is expected and updates the writer's state.

WriteStartArray()()()()
Writes the beginning of a Json array.

WriteStartConstructor(String)
Writes the start of a constructor with the given name.

WriteStartObject()()()()
Writes the beginning of a Json object.

WriteState
Gets the state of the writer.

WriteToken(JsonReader)
Writes the current JsonReader token.

WriteUndefined()()()()
Writes an undefined value.

WriteValue(String)
Writes a String value.

WriteValue(Int32)
Writes a Int32 value.

WriteValue(UInt32)
Writes a UInt32 value.

WriteValue(Int64)
Writes a Int64 value.

WriteValue(UInt64)
Writes a UInt64 value.

WriteValue(Single)
Writes a Single value.

WriteValue(Double)
Writes a Double value.

WriteValue(Boolean)
Writes a Boolean value.

WriteValue(Int16)
Writes a Int16 value.

WriteValue(UInt16)
Writes a UInt16 value.

WriteValue(Char)
Writes a Char value.

WriteValue(Byte)
Writes a Byte value.

WriteValue(SByte)
Writes a SByte value.

WriteValue(Decimal)
Writes a Decimal value.

WriteValue(DateTime)
Writes a DateTime value.

WriteValue(DateTimeOffset)
Writes a DateTimeOffset value.

WriteValue(Nullable<(Of <<'(Int32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(UInt32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(Int64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(UInt64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(Single>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(Double>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(Boolean>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(Int16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(UInt16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(Char>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(Byte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(SByte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(Decimal>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(DateTime>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.

WriteValue(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value.

WriteValue(Object)
Writes a Object value. An error will raised if the value cannot be written as a single JSON token.

WriteValueDelimiter()()()()
Writes the JSON value delimiter.

WriteWhitespace(String)
Writes out the given white space.

Inheritance Hierarchy
Object
 | JsonWriter
 |  | BsonWriter
 |  | JsonTextWriter
 |  | JTokenWriter


JsonWriter Constructor

JsonWriter Constructor
Namespaces ► Newtonsoft.Json ► JsonWriter ► JsonWriter()()()()
Creates an instance of the JsonWriter class.
Declaration Syntax
C# Visual Basic Visual C++
protected JsonWriter()
Protected Sub New
protected:
JsonWriter()


Close Method

Close Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► Close()()()()
Closes this stream and the underlying stream.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void Close()
Public Overridable Sub Close
public:
virtual void Close()


CloseOutput Property

CloseOutput Property
Namespaces ► Newtonsoft.Json ► JsonWriter ► CloseOutput
Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the writer is closed.
Declaration Syntax
C# Visual Basic Visual C++
public bool CloseOutput { get; set; }
Public Property CloseOutput As Boolean
    Get
    Set
public:
property bool CloseOutput {
    bool get ();
    void set (bool value);
}
Value
true to close the underlying stream or TextReader when the writer is closed; otherwise false. The default is true.


Flush Method

Flush Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► Flush()()()()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
Declaration Syntax
C# Visual Basic Visual C++
public abstract void Flush()
Public MustOverride Sub Flush
public:
virtual void Flush() abstract


Formatting Property

Formatting Property
Namespaces ► Newtonsoft.Json ► JsonWriter ► Formatting
Indicates how the output is formatted.
Declaration Syntax
C# Visual Basic Visual C++
public Formatting Formatting { get; set; }
Public Property Formatting As Formatting
    Get
    Set
public:
property Formatting Formatting {
    Formatting get ();
    void set (Formatting value);
}


Top Property

Top Property
Namespaces ► Newtonsoft.Json ► JsonWriter ► Top
Gets the top.
Declaration Syntax
C# Visual Basic Visual C++
protected internal int Top { get; }
Protected Friend ReadOnly Property Top As Integer
    Get
protected public:
property int Top {
    int get ();
}
Value
The top.


WriteComment Method (text)

WriteComment Method (text)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteComment(String)
Writes out a comment
CopyC#
/*...*/
 containing the specified text.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteComment(
    string text
)
Public Overridable Sub WriteComment ( _
    text As String _
)
public:
virtual void WriteComment(
    String^ text
)
Parameters
text (String)
Text to place inside the comment.


WriteEnd Method

WriteEnd Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteEnd()()()()
Members
Icon | Member | Description
 | WriteEnd()()()() | Writes the end of the current Json object or array.
 | WriteEnd(JsonToken) | Writes the specified end token.


WriteEnd Method

WriteEnd Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteEnd()()()()
Writes the end of the current Json object or array.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteEnd()
Public Sub WriteEnd
public:
void WriteEnd()


WriteEnd Method (token)

WriteEnd Method (token)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteEnd(JsonToken)
Writes the specified end token.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void WriteEnd(
    JsonToken token
)
Protected Overridable Sub WriteEnd ( _
    token As JsonToken _
)
protected:
virtual void WriteEnd(
    JsonToken token
)
Parameters
token (JsonToken)
The end token to write.


WriteEndArray Method

WriteEndArray Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteEndArray()()()()
Writes the end of an array.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteEndArray()
Public Sub WriteEndArray
public:
void WriteEndArray()


WriteEndConstructor Method

WriteEndConstructor Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteEndConstructor()()()()
Writes the end constructor.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteEndConstructor()
Public Sub WriteEndConstructor
public:
void WriteEndConstructor()


WriteEndObject Method

WriteEndObject Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteEndObject()()()()
Writes the end of a Json object.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteEndObject()
Public Sub WriteEndObject
public:
void WriteEndObject()


WriteIndent Method

WriteIndent Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteIndent()()()()
Writes indent characters.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void WriteIndent()
Protected Overridable Sub WriteIndent
protected:
virtual void WriteIndent()


WriteIndentSpace Method

WriteIndentSpace Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteIndentSpace()()()()
Writes an indent space.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void WriteIndentSpace()
Protected Overridable Sub WriteIndentSpace
protected:
virtual void WriteIndentSpace()


WriteNull Method

WriteNull Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteNull()()()()
Writes a null value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteNull()
Public Overridable Sub WriteNull
public:
virtual void WriteNull()


WritePropertyName Method (name)

WritePropertyName Method (name)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WritePropertyName(String)
Writes the property name of a name/value pair on a Json object.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WritePropertyName(
    string name
)
Public Overridable Sub WritePropertyName ( _
    name As String _
)
public:
virtual void WritePropertyName(
    String^ name
)
Parameters
name (String)
The name of the property.


WriteRaw Method (json)

WriteRaw Method (json)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteRaw(String)
Writes raw JSON without changing the writer's state.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteRaw(
    string json
)
Public Overridable Sub WriteRaw ( _
    json As String _
)
public:
virtual void WriteRaw(
    String^ json
)
Parameters
json (String)
The raw JSON to write.


WriteRawValue Method (json)

WriteRawValue Method (json)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteRawValue(String)
Writes raw JSON where a value is expected and updates the writer's state.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteRawValue(
    string json
)
Public Overridable Sub WriteRawValue ( _
    json As String _
)
public:
virtual void WriteRawValue(
    String^ json
)
Parameters
json (String)
The raw JSON to write.


WriteStartArray Method

WriteStartArray Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteStartArray()()()()
Writes the beginning of a Json array.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteStartArray()
Public Overridable Sub WriteStartArray
public:
virtual void WriteStartArray()


WriteStartConstructor Method (name)

WriteStartConstructor Method (name)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteStartConstructor(String)
Writes the start of a constructor with the given name.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteStartConstructor(
    string name
)
Public Overridable Sub WriteStartConstructor ( _
    name As String _
)
public:
virtual void WriteStartConstructor(
    String^ name
)
Parameters
name (String)
The name of the constructor.


WriteStartObject Method

WriteStartObject Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteStartObject()()()()
Writes the beginning of a Json object.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteStartObject()
Public Overridable Sub WriteStartObject
public:
virtual void WriteStartObject()


WriteState Property

WriteState Property
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteState
Gets the state of the writer.
Declaration Syntax
C# Visual Basic Visual C++
public WriteState WriteState { get; }
Public ReadOnly Property WriteState As WriteState
    Get
public:
property WriteState WriteState {
    WriteState get ();
}


WriteToken Method (reader)

WriteToken Method (reader)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteToken(JsonReader)
Writes the current JsonReader token.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteToken(
    JsonReader reader
)
Public Sub WriteToken ( _
    reader As JsonReader _
)
public:
void WriteToken(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
The JsonReader to read the token from.


WriteUndefined Method

WriteUndefined Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteUndefined()()()()
Writes an undefined value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteUndefined()
Public Overridable Sub WriteUndefined
public:
virtual void WriteUndefined()


WriteValue Method

WriteValue Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue()()()()
Members
Icon | Member | Description
 | WriteValue(String) | Writes a String value.
 | WriteValue(Int32) | Writes a Int32 value.
 | WriteValue(UInt32) | Writes a UInt32 value.
 | WriteValue(Int64) | Writes a Int64 value.
 | WriteValue(UInt64) | Writes a UInt64 value.
 | WriteValue(Single) | Writes a Single value.
 | WriteValue(Double) | Writes a Double value.
 | WriteValue(Boolean) | Writes a Boolean value.
 | WriteValue(Int16) | Writes a Int16 value.
 | WriteValue(UInt16) | Writes a UInt16 value.
 | WriteValue(Char) | Writes a Char value.
 | WriteValue(Byte) | Writes a Byte value.
 | WriteValue(SByte) | Writes a SByte value.
 | WriteValue(Decimal) | Writes a Decimal value.
 | WriteValue(DateTime) | Writes a DateTime value.
 | WriteValue(DateTimeOffset) | Writes a DateTimeOffset value.
 | WriteValue(Nullable<(Of <<'(Int32>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt32>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Int64>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt64>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Single>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Double>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Boolean>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Int16>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt16>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Char>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Byte>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(SByte>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Decimal>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(DateTime>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(array<Byte>[]()[][]) | Writes a array<Byte>[]()[][] value.
 | WriteValue(Object) | Writes a Object value. An error will raised if the value cannot be written as a single JSON token.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Boolean)
Writes a Boolean value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    bool value
)
Public Overridable Sub WriteValue ( _
    value As Boolean _
)
public:
virtual void WriteValue(
    bool value
)
Parameters
value (Boolean)
The Boolean value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Byte)
Writes a Byte value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    byte value
)
Public Overridable Sub WriteValue ( _
    value As Byte _
)
public:
virtual void WriteValue(
    unsigned char value
)
Parameters
value (Byte)
The Byte value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    byte[] value
)
Public Overridable Sub WriteValue ( _
    value As Byte() _
)
public:
virtual void WriteValue(
    array<unsigned char>^ value
)
Parameters
value (array< Byte >[]()[][])
The array<Byte>[]()[][] value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Char)
Writes a Char value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    char value
)
Public Overridable Sub WriteValue ( _
    value As Char _
)
public:
virtual void WriteValue(
    wchar_t value
)
Parameters
value (Char)
The Char value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(DateTime)
Writes a DateTime value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    DateTime value
)
Public Overridable Sub WriteValue ( _
    value As DateTime _
)
public:
virtual void WriteValue(
    DateTime value
)
Parameters
value (DateTime)
The DateTime value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(DateTimeOffset)
Writes a DateTimeOffset value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    DateTimeOffset value
)
Public Overridable Sub WriteValue ( _
    value As DateTimeOffset _
)
public:
virtual void WriteValue(
    DateTimeOffset value
)
Parameters
value (DateTimeOffset)
The DateTimeOffset value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Decimal)
Writes a Decimal value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    decimal value
)
Public Overridable Sub WriteValue ( _
    value As Decimal _
)
public:
virtual void WriteValue(
    Decimal value
)
Parameters
value (Decimal)
The Decimal value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Double)
Writes a Double value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    double value
)
Public Overridable Sub WriteValue ( _
    value As Double _
)
public:
virtual void WriteValue(
    double value
)
Parameters
value (Double)
The Double value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Int16)
Writes a Int16 value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    short value
)
Public Overridable Sub WriteValue ( _
    value As Short _
)
public:
virtual void WriteValue(
    short value
)
Parameters
value (Int16)
The Int16 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Int32)
Writes a Int32 value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    int value
)
Public Overridable Sub WriteValue ( _
    value As Integer _
)
public:
virtual void WriteValue(
    int value
)
Parameters
value (Int32)
The Int32 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Int64)
Writes a Int64 value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    long value
)
Public Overridable Sub WriteValue ( _
    value As Long _
)
public:
virtual void WriteValue(
    long long value
)
Parameters
value (Int64)
The Int64 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(Boolean>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<bool> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of Boolean) _
)
public:
virtual void WriteValue(
    Nullable<bool> value
)
Parameters
value (Nullable <(Of <(<' Boolean >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(Byte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<byte> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of Byte) _
)
public:
virtual void WriteValue(
    Nullable<unsigned char> value
)
Parameters
value (Nullable <(Of <(<' Byte >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(Char>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<char> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of Char) _
)
public:
virtual void WriteValue(
    Nullable<wchar_t> value
)
Parameters
value (Nullable <(Of <(<' Char >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(DateTime>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<DateTime> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of DateTime) _
)
public:
virtual void WriteValue(
    Nullable<DateTime> value
)
Parameters
value (Nullable <(Of <(<' DateTime >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<DateTimeOffset> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of DateTimeOffset) _
)
public:
virtual void WriteValue(
    Nullable<DateTimeOffset> value
)
Parameters
value (Nullable <(Of <(<' DateTimeOffset >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(Decimal>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<decimal> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of Decimal) _
)
public:
virtual void WriteValue(
    Nullable<Decimal> value
)
Parameters
value (Nullable <(Of <(<' Decimal >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(Double>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<double> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of Double) _
)
public:
virtual void WriteValue(
    Nullable<double> value
)
Parameters
value (Nullable <(Of <(<' Double >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(Int16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<short> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of Short) _
)
public:
virtual void WriteValue(
    Nullable<short> value
)
Parameters
value (Nullable <(Of <(<' Int16 >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(Int32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<int> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of Integer) _
)
public:
virtual void WriteValue(
    Nullable<int> value
)
Parameters
value (Nullable <(Of <(<' Int32 >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(Int64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<long> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of Long) _
)
public:
virtual void WriteValue(
    Nullable<long long> value
)
Parameters
value (Nullable <(Of <(<' Int64 >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(SByte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<sbyte> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of SByte) _
)
public:
virtual void WriteValue(
    Nullable<signed char> value
)
Parameters
value (Nullable <(Of <(<' SByte >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(Single>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<float> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of Single) _
)
public:
virtual void WriteValue(
    Nullable<float> value
)
Parameters
value (Nullable <(Of <(<' Single >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(UInt16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<ushort> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of UShort) _
)
public:
virtual void WriteValue(
    Nullable<unsigned short> value
)
Parameters
value (Nullable <(Of <(<' UInt16 >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(UInt32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<uint> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of UInteger) _
)
public:
virtual void WriteValue(
    Nullable<unsigned int> value
)
Parameters
value (Nullable <(Of <(<' UInt32 >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Nullable<(Of <<'(UInt64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Nullable<ulong> value
)
Public Overridable Sub WriteValue ( _
    value As Nullable(Of ULong) _
)
public:
virtual void WriteValue(
    Nullable<unsigned long long> value
)
Parameters
value (Nullable <(Of <(<' UInt64 >)>)>)
The Nullable<(Of <(<'T>)>)> value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Object)
Writes a Object value. An error will raised if the value cannot be written as a single JSON token.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    Object value
)
Public Overridable Sub WriteValue ( _
    value As Object _
)
public:
virtual void WriteValue(
    Object^ value
)
Parameters
value (Object)
The Object value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(SByte)
Writes a SByte value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    sbyte value
)
Public Overridable Sub WriteValue ( _
    value As SByte _
)
public:
virtual void WriteValue(
    signed char value
)
Parameters
value (SByte)
The SByte value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(Single)
Writes a Single value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    float value
)
Public Overridable Sub WriteValue ( _
    value As Single _
)
public:
virtual void WriteValue(
    float value
)
Parameters
value (Single)
The Single value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(String)
Writes a String value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    string value
)
Public Overridable Sub WriteValue ( _
    value As String _
)
public:
virtual void WriteValue(
    String^ value
)
Parameters
value (String)
The String value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(UInt16)
Writes a UInt16 value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    ushort value
)
Public Overridable Sub WriteValue ( _
    value As UShort _
)
public:
virtual void WriteValue(
    unsigned short value
)
Parameters
value (UInt16)
The UInt16 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(UInt32)
Writes a UInt32 value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    uint value
)
Public Overridable Sub WriteValue ( _
    value As UInteger _
)
public:
virtual void WriteValue(
    unsigned int value
)
Parameters
value (UInt32)
The UInt32 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValue(UInt64)
Writes a UInt64 value.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteValue(
    ulong value
)
Public Overridable Sub WriteValue ( _
    value As ULong _
)
public:
virtual void WriteValue(
    unsigned long long value
)
Parameters
value (UInt64)
The UInt64 value to write.


WriteValueDelimiter Method

WriteValueDelimiter Method
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteValueDelimiter()()()()
Writes the JSON value delimiter.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void WriteValueDelimiter()
Protected Overridable Sub WriteValueDelimiter
protected:
virtual void WriteValueDelimiter()


WriteWhitespace Method (ws)

WriteWhitespace Method (ws)
Namespaces ► Newtonsoft.Json ► JsonWriter ► WriteWhitespace(String)
Writes out the given white space.
Declaration Syntax
C# Visual Basic Visual C++
public virtual void WriteWhitespace(
    string ws
)
Public Overridable Sub WriteWhitespace ( _
    ws As String _
)
public:
virtual void WriteWhitespace(
    String^ ws
)
Parameters
ws (String)
The string of white space characters.


JsonWriterException Class

JsonWriterException Class
Namespaces ► Newtonsoft.Json ► JsonWriterException
The exception thrown when an error occurs while reading Json text.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonWriterException : Exception
Public Class JsonWriterException _
    Inherits Exception
public ref class JsonWriterException : public Exception
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonWriterException()()()() | Initializes a new instance of the JsonWriterException class.
 | JsonWriterException(String) | Initializes a new instance of the JsonWriterException class with a specified error message.
 | JsonWriterException(String, Exception) | Initializes a new instance of the JsonWriterException class with a specified error message and a reference to the inner exception that is the cause of this exception.
 | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetBaseException()()()() | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetObjectData(SerializationInfo, StreamingContext) | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
 | GetType()()()() | Gets the runtime type of the current instance. (Inherited from Exception.)
 | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
 | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
 | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Message | Gets a message that describes the current exception. (Inherited from Exception.)
 | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
 | StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.)
 | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
 | ToString()()()() | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Inheritance Hierarchy
Object
 | Exception
 |  | JsonWriterException


JsonWriterException Constructor

JsonWriterException Constructor
Namespaces ► Newtonsoft.Json ► JsonWriterException ► JsonWriterException()()()()
Members
Icon | Member | Description
 | JsonWriterException()()()() | Initializes a new instance of the JsonWriterException class.
 | JsonWriterException(String) | Initializes a new instance of the JsonWriterException class with a specified error message.
 | JsonWriterException(String, Exception) | Initializes a new instance of the JsonWriterException class with a specified error message and a reference to the inner exception that is the cause of this exception.


JsonWriterException Constructor

JsonWriterException Constructor
Namespaces ► Newtonsoft.Json ► JsonWriterException ► JsonWriterException()()()()
Initializes a new instance of the JsonWriterException class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonWriterException()
Public Sub New
public:
JsonWriterException()


JsonWriterException Constructor (message)

JsonWriterException Constructor (message)
Namespaces ► Newtonsoft.Json ► JsonWriterException ► JsonWriterException(String)
Initializes a new instance of the JsonWriterException class with a specified error message.
Declaration Syntax
C# Visual Basic Visual C++
public JsonWriterException(
    string message
)
Public Sub New ( _
    message As String _
)
public:
JsonWriterException(
    String^ message
)
Parameters
message (String)
The error message that explains the reason for the exception.


JsonWriterException Constructor (message, innerException)

JsonWriterException Constructor (message, innerException)
Namespaces ► Newtonsoft.Json ► JsonWriterException ► JsonWriterException(String, Exception)
Initializes a new instance of the JsonWriterException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration Syntax
C# Visual Basic Visual C++
public JsonWriterException(
    string message,
    Exception innerException
)
Public Sub New ( _
    message As String, _
    innerException As Exception _
)
public:
JsonWriterException(
    String^ message,
    Exception^ innerException
)
Parameters
message (String)
The error message that explains the reason for the exception.
innerException (Exception)
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.


MemberSerialization Enumeration

MemberSerialization Enumeration
Namespaces ► Newtonsoft.Json ► MemberSerialization
Specifies the member serialization options for the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public enum MemberSerialization
Public Enumeration MemberSerialization
public enum class MemberSerialization
Members
Member | Description
OptOut | All members are serialized by default. Members can be excluded using the JsonIgnoreAttribute.
OptIn | Only members must be marked with the JsonPropertyAttribute are serialized.


MissingMemberHandling Enumeration

MissingMemberHandling Enumeration
Namespaces ► Newtonsoft.Json ► MissingMemberHandling
Specifies missing member handling options for the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public enum MissingMemberHandling
Public Enumeration MissingMemberHandling
public enum class MissingMemberHandling
Members
Member | Description
Ignore | Ignore a missing member and do not attempt to deserialize it.
Error | Throw a JsonSerializationException when a missing member is encountered during deserialization.


NullValueHandling Enumeration

NullValueHandling Enumeration
Namespaces ► Newtonsoft.Json ► NullValueHandling
Specifies null value handling options for the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public enum NullValueHandling
Public Enumeration NullValueHandling
public enum class NullValueHandling
Members
Member | Description
Include | Include null values when serializing and deserializing objects.
Ignore | Ignore null values when serializing and deserializing objects.


ObjectCreationHandling Enumeration

ObjectCreationHandling Enumeration
Namespaces ► Newtonsoft.Json ► ObjectCreationHandling
Specifies how object creation is handled by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public enum ObjectCreationHandling
Public Enumeration ObjectCreationHandling
public enum class ObjectCreationHandling
Members
Member | Description
Auto | Reuse existing objects, create new objects when needed.
Reuse | Only reuse existing objects.
Replace | Always create new objects.


PreserveReferencesHandling Enumeration

PreserveReferencesHandling Enumeration
Namespaces ► Newtonsoft.Json ► PreserveReferencesHandling
Specifies reference handling options for the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
[FlagsAttribute]
public enum PreserveReferencesHandling
<FlagsAttribute> _
Public Enumeration PreserveReferencesHandling
[FlagsAttribute]
public enum class PreserveReferencesHandling
Members
Member | Description
None | Do not preserve references when serializing types.
Objects | Preserve references when serializing into a JSON object structure.
Arrays | Preserve references when serializing into a JSON array structure.
All | Preserve references when serializing.


ReferenceLoopHandling Enumeration

ReferenceLoopHandling Enumeration
Namespaces ► Newtonsoft.Json ► ReferenceLoopHandling
Specifies reference loop handling options for the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public enum ReferenceLoopHandling
Public Enumeration ReferenceLoopHandling
public enum class ReferenceLoopHandling
Members
Member | Description
Error | Throw a JsonSerializationException when a loop is encountered.
Ignore | Ignore loop references and do not serialize.
Serialize | Serialize loop references.


Required Enumeration

Required Enumeration
Namespaces ► Newtonsoft.Json ► Required
Indicating whether a property is required.
Declaration Syntax
C# Visual Basic Visual C++
public enum Required
Public Enumeration Required
public enum class Required
Members
Member | Description
Default | The property is not required. The default state.
AllowNull | The property must be defined in JSON but can be a null value.
Always | The property must be defined in JSON and cannot be a null value.


TypeNameHandling Enumeration

TypeNameHandling Enumeration
Namespaces ► Newtonsoft.Json ► TypeNameHandling
Specifies type name handling options for the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
[FlagsAttribute]
public enum TypeNameHandling
<FlagsAttribute> _
Public Enumeration TypeNameHandling
[FlagsAttribute]
public enum class TypeNameHandling
Members
Member | Description
None | Do not include the .NET type name when serializing types.
Objects | Include the .NET type name when serializing into a JSON object structure.
Arrays | Include the .NET type name when serializing into a JSON array structure.
Auto | Include the .NET type name when the type of the object being serialized is not the same as its declared type.
All | Always include the .NET type name when serializing.


WriteState Enumeration

WriteState Enumeration
Namespaces ► Newtonsoft.Json ► WriteState
Specifies the state of the JsonWriter.
Declaration Syntax
C# Visual Basic Visual C++
public enum WriteState
Public Enumeration WriteState
public enum class WriteState
Members
Member | Description
Error | An exception has been thrown, which has left the JsonWriter in an invalid state. You may call the Close()()()() method to put the JsonWriter in the Closed state. Any other JsonWriter method calls results in an InvalidOperationException being thrown.
Closed | The Close()()()() method has been called.
Object | An object is being written.
Array | A array is being written.
Constructor | A constructor is being written.
Property | A property is being written.
Start | A write method has not been called.


Newtonsoft.Json.Bson Namespace

Newtonsoft.Json.Bson Namespace
Namespaces ► Newtonsoft.Json.Bson
The Newtonsoft.Json.Linq namespace provides classes that are used to implement BSON.
Declaration Syntax
C# Visual Basic Visual C++
namespace Newtonsoft.Json.Bson
Namespace Newtonsoft.Json.Bson
namespace Newtonsoft.Json.Bson
Types
All Types Classes
Icon | Type | Description
 | BsonObjectId | Represents a BSON Oid (object id).
 | BsonReader | Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
 | BsonWriter | Represents a writer that provides a fast, non-cached, forward-only way of generating Json data.


BsonObjectId Class

BsonObjectId Class
Namespaces ► Newtonsoft.Json.Bson ► BsonObjectId
Represents a BSON Oid (object id).
Declaration Syntax
C# Visual Basic Visual C++
public class BsonObjectId
Public Class BsonObjectId
public ref class BsonObjectId
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | BsonObjectId(array<Byte>[]()[][]) | Initializes a new instance of the BsonObjectId class.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Value | Gets or sets the value of the Oid.
Inheritance Hierarchy
Object
BsonObjectId


BsonObjectId Constructor (value)

BsonObjectId Constructor (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonObjectId ► BsonObjectId(array<Byte>[]()[][])
Initializes a new instance of the BsonObjectId class.
Declaration Syntax
C# Visual Basic Visual C++
public BsonObjectId(
    byte[] value
)
Public Sub New ( _
    value As Byte() _
)
public:
BsonObjectId(
    array<unsigned char>^ value
)
Parameters
value (array< Byte >[]()[][])
The Oid value.


Value Property

Value Property
Namespaces ► Newtonsoft.Json.Bson ► BsonObjectId ► Value
Gets or sets the value of the Oid.
Declaration Syntax
C# Visual Basic Visual C++
public byte[] Value { get; private set; }
Public Property Value As Byte()
    Get
    Private Set
public:
property array<unsigned char>^ Value {
    array<unsigned char>^ get ();
    private: void set (array<unsigned char>^ value);
}
Value
The value of the Oid.


BsonReader Class

BsonReader Class
Namespaces ► Newtonsoft.Json.Bson ► BsonReader
Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
Declaration Syntax
C# Visual Basic Visual C++
public class BsonReader : JsonReader
Public Class BsonReader _
    Inherits JsonReader
public ref class BsonReader : public JsonReader
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | BsonReader(Stream) | Initializes a new instance of the BsonReader class.
 | BsonReader(Stream, Boolean, DateTimeKind) | Initializes a new instance of the BsonReader class.
 | Close()()()() | Changes the JsonReader..::..State to Closed. (Overrides JsonReader.Close()()()().)
 | CloseInput | Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed. (Inherited from JsonReader.)
 | CurrentState | Gets the current reader state. (Inherited from JsonReader.)
 | DateTimeKindHandling | Gets or sets the DateTimeKind used when reading DateTime values from BSON.
 | Depth | Gets the depth of the current token in the JSON document. (Inherited from JsonReader.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from JsonReader.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | JsonNet35BinaryCompatibility | Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | QuoteChar | Gets the quotation mark character used to enclose the value of a string. (Inherited from JsonReader.)
 | Read()()()() | Reads the next JSON token from the stream. (Overrides JsonReader.Read()()()().)
 | ReadAsBytes()()()() | Reads the next JSON token from the stream as a array<Byte>[]()[][]. (Overrides JsonReader.ReadAsBytes()()()().)
 | ReadAsDateTimeOffset()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>. (Overrides JsonReader.ReadAsDateTimeOffset()()()().)
 | ReadAsDecimal()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>. (Overrides JsonReader.ReadAsDecimal()()()().)
 | ReadRootValueAsArray | Gets or sets a value indicating whether the root object will be read as a JSON array.
 | SetStateBasedOnCurrent()()()() | Sets the state based on current token type. (Inherited from JsonReader.)
 | SetToken(JsonToken) | Sets the current token. (Inherited from JsonReader.)
 | SetToken(JsonToken, Object) | Sets the current token and value. (Inherited from JsonReader.)
 | Skip()()()() | Skips the children of the current token. (Inherited from JsonReader.)
 | TokenType | Gets the type of the current Json token. (Inherited from JsonReader.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Value | Gets the text value of the current Json token. (Inherited from JsonReader.)
 | ValueType | Gets The Common Language Runtime (CLR) type for the current Json token. (Inherited from JsonReader.)
Inheritance Hierarchy
Object
 | JsonReader
 |  | BsonReader


BsonReader Constructor

BsonReader Constructor
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► BsonReader()()()()
Members
Icon | Member | Description
 | BsonReader(Stream) | Initializes a new instance of the BsonReader class.
 | BsonReader(Stream, Boolean, DateTimeKind) | Initializes a new instance of the BsonReader class.


BsonReader Constructor (stream)

BsonReader Constructor (stream)
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► BsonReader(Stream)
Initializes a new instance of the BsonReader class.
Declaration Syntax
C# Visual Basic Visual C++
public BsonReader(
    Stream stream
)
Public Sub New ( _
    stream As Stream _
)
public:
BsonReader(
    Stream^ stream
)
Parameters
stream (Stream)
The stream.


BsonReader Constructor (stream, readRootValueAsArray, dateTimeKindHandling)

BsonReader Constructor (stream, readRootValueAsArray, dateTimeKindHandling)
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► BsonReader(Stream, Boolean, DateTimeKind)
Initializes a new instance of the BsonReader class.
Declaration Syntax
C# Visual Basic Visual C++
public BsonReader(
    Stream stream,
    bool readRootValueAsArray,
    DateTimeKind dateTimeKindHandling
)
Public Sub New ( _
    stream As Stream, _
    readRootValueAsArray As Boolean, _
    dateTimeKindHandling As DateTimeKind _
)
public:
BsonReader(
    Stream^ stream,
    bool readRootValueAsArray,
    DateTimeKind dateTimeKindHandling
)
Parameters
stream (Stream)
The stream.
readRootValueAsArray (Boolean)
if set to true the root object will be read as a JSON array.
dateTimeKindHandling (DateTimeKind)
The DateTimeKind used when reading DateTime values from BSON.


Close Method

Close Method
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► Close()()()()
Changes the JsonReader..::..State to Closed.
Declaration Syntax
C# Visual Basic Visual C++
public override void Close()
Public Overrides Sub Close
public:
virtual void Close() override


DateTimeKindHandling Property

DateTimeKindHandling Property
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► DateTimeKindHandling
Gets or sets the DateTimeKind used when reading DateTime values from BSON.
Declaration Syntax
C# Visual Basic Visual C++
public DateTimeKind DateTimeKindHandling { get; set; }
Public Property DateTimeKindHandling As DateTimeKind
    Get
    Set
public:
property DateTimeKind DateTimeKindHandling {
    DateTimeKind get ();
    void set (DateTimeKind value);
}
Value
The DateTimeKind used when reading DateTime values from BSON.


JsonNet35BinaryCompatibility Property

JsonNet35BinaryCompatibility Property
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► JsonNet35BinaryCompatibility
Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary.
Declaration Syntax
C# Visual Basic Visual C++
public bool JsonNet35BinaryCompatibility { get; set; }
Public Property JsonNet35BinaryCompatibility As Boolean
    Get
    Set
public:
property bool JsonNet35BinaryCompatibility {
    bool get ();
    void set (bool value);
}
Value
true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.


Read Method

Read Method
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► Read()()()()
Reads the next JSON token from the stream.
Declaration Syntax
C# Visual Basic Visual C++
public override bool Read()
Public Overrides Function Read As Boolean
public:
virtual bool Read() override
Return Value
true if the next token was read successfully; false if there are no more tokens to read.


ReadAsBytes Method

ReadAsBytes Method
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► ReadAsBytes()()()()
Reads the next JSON token from the stream as a array<Byte>[]()[][].
Declaration Syntax
C# Visual Basic Visual C++
public override byte[] ReadAsBytes()
Public Overrides Function ReadAsBytes As Byte()
public:
virtual array<unsigned char>^ ReadAsBytes() override
Return Value
A array<Byte>[]()[][] or a null reference if the next JSON token is null.


ReadAsDateTimeOffset Method

ReadAsDateTimeOffset Method
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► ReadAsDateTimeOffset()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public override Nullable<DateTimeOffset> ReadAsDateTimeOffset()
Public Overrides Function ReadAsDateTimeOffset As Nullable(Of DateTimeOffset)
public:
virtual Nullable<DateTimeOffset> ReadAsDateTimeOffset() override
Return Value
A Nullable<(Of <(<'T>)>)>.


ReadAsDecimal Method

ReadAsDecimal Method
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► ReadAsDecimal()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public override Nullable<decimal> ReadAsDecimal()
Public Overrides Function ReadAsDecimal As Nullable(Of Decimal)
public:
virtual Nullable<Decimal> ReadAsDecimal() override
Return Value
A Nullable<(Of <(<'T>)>)>.


ReadRootValueAsArray Property

ReadRootValueAsArray Property
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► ReadRootValueAsArray
Gets or sets a value indicating whether the root object will be read as a JSON array.
Declaration Syntax
C# Visual Basic Visual C++
public bool ReadRootValueAsArray { get; set; }
Public Property ReadRootValueAsArray As Boolean
    Get
    Set
public:
property bool ReadRootValueAsArray {
    bool get ();
    void set (bool value);
}
Value
true if the root object will be read as a JSON array; otherwise, false.


BsonWriter Class

BsonWriter Class
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter
Represents a writer that provides a fast, non-cached, forward-only way of generating Json data.
Declaration Syntax
C# Visual Basic Visual C++
public class BsonWriter : JsonWriter
Public Class BsonWriter _
    Inherits JsonWriter
public ref class BsonWriter : public JsonWriter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon Member Description
BsonWriter(Stream)
Initializes a new instance of the BsonWriter class.

Close()()()()
Closes this stream and the underlying stream.
(Overrides JsonWriter.Close()()()().)
CloseOutput
Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the writer is closed.
(Inherited from JsonWriter.)
DateTimeKindHandling
Gets or sets the DateTimeKind used when writing DateTime values to BSON. When set to Unspecified no conversion will occur.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Flush()()()()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
(Overrides JsonWriter.Flush()()()().)
Formatting
Indicates how the output is formatted.
(Inherited from JsonWriter.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Top
Gets the top.
(Inherited from JsonWriter.)
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
WriteComment(String)
Writes out a comment
CopyC#
/*...*/
 containing the specified text.
(Overrides JsonWriter.WriteComment(String).)
WriteEnd(JsonToken)
Writes the end.
(Overrides JsonWriter.WriteEnd(JsonToken).)
WriteEnd()()()()
Writes the end of the current Json object or array.
(Inherited from JsonWriter.)
WriteEndArray()()()()
Writes the end of an array.
(Inherited from JsonWriter.)
WriteEndConstructor()()()()
Writes the end constructor.
(Inherited from JsonWriter.)
WriteEndObject()()()()
Writes the end of a Json object.
(Inherited from JsonWriter.)
WriteIndent()()()()
Writes indent characters.
(Inherited from JsonWriter.)
WriteIndentSpace()()()()
Writes an indent space.
(Inherited from JsonWriter.)
WriteNull()()()()
Writes a null value.
(Overrides JsonWriter.WriteNull()()()().)
WriteObjectId(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value that represents a BSON object id.

WritePropertyName(String)
Writes the property name of a name/value pair on a Json object.
(Overrides JsonWriter.WritePropertyName(String).)
WriteRaw(String)
Writes raw JSON.
(Overrides JsonWriter.WriteRaw(String).)
WriteRawValue(String)
Writes raw JSON where a value is expected and updates the writer's state.
(Overrides JsonWriter.WriteRawValue(String).)
WriteRegex(String, String)
Writes a BSON regex.

WriteStartArray()()()()
Writes the beginning of a Json array.
(Overrides JsonWriter.WriteStartArray()()()().)
WriteStartConstructor(String)
Writes the start of a constructor with the given name.
(Overrides JsonWriter.WriteStartConstructor(String).)
WriteStartObject()()()()
Writes the beginning of a Json object.
(Overrides JsonWriter.WriteStartObject()()()().)
WriteState
Gets the state of the writer.
(Inherited from JsonWriter.)
WriteToken(JsonReader)
Writes the current JsonReader token.
(Inherited from JsonWriter.)
WriteUndefined()()()()
Writes an undefined value.
(Overrides JsonWriter.WriteUndefined()()()().)
WriteValue(String)
Writes a String value.
(Overrides JsonWriter.WriteValue(String).)
WriteValue(Int32)
Writes a Int32 value.
(Overrides JsonWriter.WriteValue(Int32).)
WriteValue(UInt32)
Writes a UInt32 value.
(Overrides JsonWriter.WriteValue(UInt32).)
WriteValue(Int64)
Writes a Int64 value.
(Overrides JsonWriter.WriteValue(Int64).)
WriteValue(UInt64)
Writes a UInt64 value.
(Overrides JsonWriter.WriteValue(UInt64).)
WriteValue(Single)
Writes a Single value.
(Overrides JsonWriter.WriteValue(Single).)
WriteValue(Double)
Writes a Double value.
(Overrides JsonWriter.WriteValue(Double).)
WriteValue(Boolean)
Writes a Boolean value.
(Overrides JsonWriter.WriteValue(Boolean).)
WriteValue(Int16)
Writes a Int16 value.
(Overrides JsonWriter.WriteValue(Int16).)
WriteValue(UInt16)
Writes a UInt16 value.
(Overrides JsonWriter.WriteValue(UInt16).)
WriteValue(Char)
Writes a Char value.
(Overrides JsonWriter.WriteValue(Char).)
WriteValue(Byte)
Writes a Byte value.
(Overrides JsonWriter.WriteValue(Byte).)
WriteValue(SByte)
Writes a SByte value.
(Overrides JsonWriter.WriteValue(SByte).)
WriteValue(Decimal)
Writes a Decimal value.
(Overrides JsonWriter.WriteValue(Decimal).)
WriteValue(DateTime)
Writes a DateTime value.
(Overrides JsonWriter.WriteValue(DateTime).)
WriteValue(DateTimeOffset)
Writes a DateTimeOffset value.
(Overrides JsonWriter.WriteValue(DateTimeOffset).)
WriteValue(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value.
(Overrides JsonWriter.WriteValue(array<Byte>[]()[][]).)
WriteValue(Nullable<(Of <<'(Int32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Int64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Single>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Double>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Boolean>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Int16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Char>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Byte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(SByte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Decimal>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(DateTime>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Object)
Writes a Object value. An error will raised if the value cannot be written as a single JSON token.
(Inherited from JsonWriter.)
WriteValueDelimiter()()()()
Writes the JSON value delimiter.
(Inherited from JsonWriter.)
WriteWhitespace(String)
Writes out the given white space.
(Inherited from JsonWriter.)
Inheritance Hierarchy
Object
 | JsonWriter
 |  | BsonWriter


BsonWriter Constructor (stream)

BsonWriter Constructor (stream)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► BsonWriter(Stream)
Initializes a new instance of the BsonWriter class.
Declaration Syntax
C# Visual Basic Visual C++
public BsonWriter(
    Stream stream
)
Public Sub New ( _
    stream As Stream _
)
public:
BsonWriter(
    Stream^ stream
)
Parameters
stream (Stream)
The stream.


Close Method

Close Method
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► Close()()()()
Closes this stream and the underlying stream.
Declaration Syntax
C# Visual Basic Visual C++
public override void Close()
Public Overrides Sub Close
public:
virtual void Close() override


DateTimeKindHandling Property

DateTimeKindHandling Property
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► DateTimeKindHandling
Gets or sets the DateTimeKind used when writing DateTime values to BSON. When set to Unspecified no conversion will occur.
Declaration Syntax
C# Visual Basic Visual C++
public DateTimeKind DateTimeKindHandling { get; set; }
Public Property DateTimeKindHandling As DateTimeKind
    Get
    Set
public:
property DateTimeKind DateTimeKindHandling {
    DateTimeKind get ();
    void set (DateTimeKind value);
}
Value
The DateTimeKind used when writing DateTime values to BSON.


Flush Method

Flush Method
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► Flush()()()()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
Declaration Syntax
C# Visual Basic Visual C++
public override void Flush()
Public Overrides Sub Flush
public:
virtual void Flush() override


WriteComment Method (text)

WriteComment Method (text)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteComment(String)
Writes out a comment
CopyC#
/*...*/
 containing the specified text.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteComment(
    string text
)
Public Overrides Sub WriteComment ( _
    text As String _
)
public:
virtual void WriteComment(
    String^ text
) override
Parameters
text (String)
Text to place inside the comment.


WriteEnd Method (token)

WriteEnd Method (token)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteEnd(JsonToken)
Writes the end.
Declaration Syntax
C# Visual Basic Visual C++
protected override void WriteEnd(
    JsonToken token
)
Protected Overrides Sub WriteEnd ( _
    token As JsonToken _
)
protected:
virtual void WriteEnd(
    JsonToken token
) override
Parameters
token (JsonToken)
The token.


WriteNull Method

WriteNull Method
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteNull()()()()
Writes a null value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteNull()
Public Overrides Sub WriteNull
public:
virtual void WriteNull() override


WriteObjectId Method (value)

WriteObjectId Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteObjectId(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value that represents a BSON object id.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteObjectId(
    byte[] value
)
Public Sub WriteObjectId ( _
    value As Byte() _
)
public:
void WriteObjectId(
    array<unsigned char>^ value
)
Parameters
value (array< Byte >[]()[][])

[Missing <param name="value"/> documentation for "M:Newtonsoft.Json.Bson.BsonWriter.WriteObjectId(System.Byte[])"]


WritePropertyName Method (name)

WritePropertyName Method (name)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WritePropertyName(String)
Writes the property name of a name/value pair on a Json object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WritePropertyName(
    string name
)
Public Overrides Sub WritePropertyName ( _
    name As String _
)
public:
virtual void WritePropertyName(
    String^ name
) override
Parameters
name (String)
The name of the property.


WriteRaw Method (json)

WriteRaw Method (json)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteRaw(String)
Writes raw JSON.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteRaw(
    string json
)
Public Overrides Sub WriteRaw ( _
    json As String _
)
public:
virtual void WriteRaw(
    String^ json
) override
Parameters
json (String)
The raw JSON to write.


WriteRawValue Method (json)

WriteRawValue Method (json)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteRawValue(String)
Writes raw JSON where a value is expected and updates the writer's state.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteRawValue(
    string json
)
Public Overrides Sub WriteRawValue ( _
    json As String _
)
public:
virtual void WriteRawValue(
    String^ json
) override
Parameters
json (String)
The raw JSON to write.


WriteRegex Method (pattern, options)

WriteRegex Method (pattern, options)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteRegex(String, String)
Writes a BSON regex.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteRegex(
    string pattern,
    string options
)
Public Sub WriteRegex ( _
    pattern As String, _
    options As String _
)
public:
void WriteRegex(
    String^ pattern,
    String^ options
)
Parameters
pattern (String)
The regex pattern.
options (String)
The regex options.


WriteStartArray Method

WriteStartArray Method
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteStartArray()()()()
Writes the beginning of a Json array.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteStartArray()
Public Overrides Sub WriteStartArray
public:
virtual void WriteStartArray() override


WriteStartConstructor Method (name)

WriteStartConstructor Method (name)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteStartConstructor(String)
Writes the start of a constructor with the given name.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteStartConstructor(
    string name
)
Public Overrides Sub WriteStartConstructor ( _
    name As String _
)
public:
virtual void WriteStartConstructor(
    String^ name
) override
Parameters
name (String)
The name of the constructor.


WriteStartObject Method

WriteStartObject Method
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteStartObject()()()()
Writes the beginning of a Json object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteStartObject()
Public Overrides Sub WriteStartObject
public:
virtual void WriteStartObject() override


WriteUndefined Method

WriteUndefined Method
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteUndefined()()()()
Writes an undefined value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteUndefined()
Public Overrides Sub WriteUndefined
public:
virtual void WriteUndefined() override


WriteValue Method

WriteValue Method
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue()()()()
Members
Icon | Member | Description
 | WriteValue(String) | Writes a String value. (Overrides JsonWriter.WriteValue(String).)
 | WriteValue(Int32) | Writes a Int32 value. (Overrides JsonWriter.WriteValue(Int32).)
 | WriteValue(UInt32) | Writes a UInt32 value. (Overrides JsonWriter.WriteValue(UInt32).)
 | WriteValue(Int64) | Writes a Int64 value. (Overrides JsonWriter.WriteValue(Int64).)
 | WriteValue(UInt64) | Writes a UInt64 value. (Overrides JsonWriter.WriteValue(UInt64).)
 | WriteValue(Single) | Writes a Single value. (Overrides JsonWriter.WriteValue(Single).)
 | WriteValue(Double) | Writes a Double value. (Overrides JsonWriter.WriteValue(Double).)
 | WriteValue(Boolean) | Writes a Boolean value. (Overrides JsonWriter.WriteValue(Boolean).)
 | WriteValue(Int16) | Writes a Int16 value. (Overrides JsonWriter.WriteValue(Int16).)
 | WriteValue(UInt16) | Writes a UInt16 value. (Overrides JsonWriter.WriteValue(UInt16).)
 | WriteValue(Char) | Writes a Char value. (Overrides JsonWriter.WriteValue(Char).)
 | WriteValue(Byte) | Writes a Byte value. (Overrides JsonWriter.WriteValue(Byte).)
 | WriteValue(SByte) | Writes a SByte value. (Overrides JsonWriter.WriteValue(SByte).)
 | WriteValue(Decimal) | Writes a Decimal value. (Overrides JsonWriter.WriteValue(Decimal).)
 | WriteValue(DateTime) | Writes a DateTime value. (Overrides JsonWriter.WriteValue(DateTime).)
 | WriteValue(DateTimeOffset) | Writes a DateTimeOffset value. (Overrides JsonWriter.WriteValue(DateTimeOffset).)
 | WriteValue(array<Byte>[]()[][]) | Writes a array<Byte>[]()[][] value. (Overrides JsonWriter.WriteValue(array<Byte>[]()[][]).)
 | WriteValue(Nullable<(Of <<'(Int32>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt32>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Int64>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt64>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Single>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Double>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Boolean>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Int16>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt16>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Char>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Byte>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(SByte>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Decimal>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(DateTime>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Object) | Writes a Object value. An error will raised if the value cannot be written as a single JSON token.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(Boolean)
Writes a Boolean value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    bool value
)
Public Overrides Sub WriteValue ( _
    value As Boolean _
)
public:
virtual void WriteValue(
    bool value
) override
Parameters
value (Boolean)
The Boolean value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(Byte)
Writes a Byte value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    byte value
)
Public Overrides Sub WriteValue ( _
    value As Byte _
)
public:
virtual void WriteValue(
    unsigned char value
) override
Parameters
value (Byte)
The Byte value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    byte[] value
)
Public Overrides Sub WriteValue ( _
    value As Byte() _
)
public:
virtual void WriteValue(
    array<unsigned char>^ value
) override
Parameters
value (array< Byte >[]()[][])
The array<Byte>[]()[][] value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(Char)
Writes a Char value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    char value
)
Public Overrides Sub WriteValue ( _
    value As Char _
)
public:
virtual void WriteValue(
    wchar_t value
) override
Parameters
value (Char)
The Char value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(DateTime)
Writes a DateTime value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    DateTime value
)
Public Overrides Sub WriteValue ( _
    value As DateTime _
)
public:
virtual void WriteValue(
    DateTime value
) override
Parameters
value (DateTime)
The DateTime value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(DateTimeOffset)
Writes a DateTimeOffset value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    DateTimeOffset value
)
Public Overrides Sub WriteValue ( _
    value As DateTimeOffset _
)
public:
virtual void WriteValue(
    DateTimeOffset value
) override
Parameters
value (DateTimeOffset)
The DateTimeOffset value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(Decimal)
Writes a Decimal value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    decimal value
)
Public Overrides Sub WriteValue ( _
    value As Decimal _
)
public:
virtual void WriteValue(
    Decimal value
) override
Parameters
value (Decimal)
The Decimal value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(Double)
Writes a Double value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    double value
)
Public Overrides Sub WriteValue ( _
    value As Double _
)
public:
virtual void WriteValue(
    double value
) override
Parameters
value (Double)
The Double value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(Int16)
Writes a Int16 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    short value
)
Public Overrides Sub WriteValue ( _
    value As Short _
)
public:
virtual void WriteValue(
    short value
) override
Parameters
value (Int16)
The Int16 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(Int32)
Writes a Int32 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    int value
)
Public Overrides Sub WriteValue ( _
    value As Integer _
)
public:
virtual void WriteValue(
    int value
) override
Parameters
value (Int32)
The Int32 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(Int64)
Writes a Int64 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    long value
)
Public Overrides Sub WriteValue ( _
    value As Long _
)
public:
virtual void WriteValue(
    long long value
) override
Parameters
value (Int64)
The Int64 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(SByte)
Writes a SByte value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    sbyte value
)
Public Overrides Sub WriteValue ( _
    value As SByte _
)
public:
virtual void WriteValue(
    signed char value
) override
Parameters
value (SByte)
The SByte value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(Single)
Writes a Single value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    float value
)
Public Overrides Sub WriteValue ( _
    value As Single _
)
public:
virtual void WriteValue(
    float value
) override
Parameters
value (Single)
The Single value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(String)
Writes a String value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    string value
)
Public Overrides Sub WriteValue ( _
    value As String _
)
public:
virtual void WriteValue(
    String^ value
) override
Parameters
value (String)
The String value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(UInt16)
Writes a UInt16 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    ushort value
)
Public Overrides Sub WriteValue ( _
    value As UShort _
)
public:
virtual void WriteValue(
    unsigned short value
) override
Parameters
value (UInt16)
The UInt16 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(UInt32)
Writes a UInt32 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    uint value
)
Public Overrides Sub WriteValue ( _
    value As UInteger _
)
public:
virtual void WriteValue(
    unsigned int value
) override
Parameters
value (UInt32)
The UInt32 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteValue(UInt64)
Writes a UInt64 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    ulong value
)
Public Overrides Sub WriteValue ( _
    value As ULong _
)
public:
virtual void WriteValue(
    unsigned long long value
) override
Parameters
value (UInt64)
The UInt64 value to write.


Newtonsoft.Json.Converters Namespace

Newtonsoft.Json.Converters Namespace
Namespaces ► Newtonsoft.Json.Converters
The Newtonsoft.Json.Converters namespace provides classes that inherit from JsonConverter.
Declaration Syntax
C# Visual Basic Visual C++
namespace Newtonsoft.Json.Converters
Namespace Newtonsoft.Json.Converters
namespace Newtonsoft.Json.Converters
Types
All Types Classes Enumerations
Icon | Type | Description
 | BinaryConverter | Converts a binary value to and from a base 64 string value.
 | BsonObjectIdConverter | Converts a BsonObjectId to and from JSON and BSON.
 | CustomCreationConverter<(Of <(<'T>)>)> | Create a custom object
 | DataSetConverter | Converts a DataSet to and from JSON.
 | DataTableConverter | Converts a DataTable to and from JSON.
 | DateTimeConverterBase | Provides a base class for converting a DateTime to and from JSON.
 | EntityKeyMemberConverter | Converts an Entity Framework EntityKey to and from JSON.
 | ExpandoObjectConverter | Converts an ExpandoObject to and from JSON.
 | IsoDateTimeConverter | Converts a DateTime to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z).
 | JavaScriptDateTimeConverter | Converts a DateTime to and from a JavaScript date constructor (e.g. new Date(52231943)).
 | JsonDateTimeSerializationMode | Specifies whether a DateTime object represents a local time, a Coordinated Universal Time (UTC), or is not specified as either local time or UTC.
 | KeyValuePairConverter | Converts a KeyValuePair<(Of <(<'TKey, TValue>)>)> to and from JSON.
 | RegexConverter | Converts a Regex to and from JSON and BSON.
 | StringEnumConverter | Converts an Enum to and from its name string value. Converts an Enum to and from its name string value.
 | XmlNodeConverter | Converts XML to and from JSON.


BinaryConverter Class

BinaryConverter Class
Namespaces ► Newtonsoft.Json.Converters ► BinaryConverter
Converts a binary value to and from a base 64 string value.
Declaration Syntax
C# Visual Basic Visual C++
public class BinaryConverter : JsonConverter
Public Class BinaryConverter _
    Inherits JsonConverter
public ref class BinaryConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | BinaryConverter()()()() | Initializes a new instance of the BinaryConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | BinaryConverter


BinaryConverter Constructor

BinaryConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► BinaryConverter ► BinaryConverter()()()()
Initializes a new instance of the BinaryConverter class
Declaration Syntax
C# Visual Basic Visual C++
public BinaryConverter()
Public Sub New
public:
BinaryConverter()


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► BinaryConverter ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type objectType
)
Public Overrides Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) override
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► BinaryConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► BinaryConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


BsonObjectIdConverter Class

BsonObjectIdConverter Class
Namespaces ► Newtonsoft.Json.Converters ► BsonObjectIdConverter
Converts a BsonObjectId to and from JSON and BSON.
Declaration Syntax
C# Visual Basic Visual C++
public class BsonObjectIdConverter : JsonConverter
Public Class BsonObjectIdConverter _
    Inherits JsonConverter
public ref class BsonObjectIdConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | BsonObjectIdConverter()()()() | Initializes a new instance of the BsonObjectIdConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | BsonObjectIdConverter


BsonObjectIdConverter Constructor

BsonObjectIdConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► BsonObjectIdConverter ► BsonObjectIdConverter()()()()
Initializes a new instance of the BsonObjectIdConverter class
Declaration Syntax
C# Visual Basic Visual C++
public BsonObjectIdConverter()
Public Sub New
public:
BsonObjectIdConverter()


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► BsonObjectIdConverter ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type objectType
)
Public Overrides Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) override
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► BsonObjectIdConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► BsonObjectIdConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


CustomCreationConverter(T) Class

CustomCreationConverter<(Of <(<'T>)>)> Class
Namespaces ► Newtonsoft.Json.Converters ► CustomCreationConverter<(Of <(<'T>)>)>
Create a custom object
Declaration Syntax
C# Visual Basic Visual C++
public abstract class CustomCreationConverter<T> : JsonConverter

Public MustInherit Class CustomCreationConverter(Of T) _
    Inherits JsonConverter
generic<typename T>
public ref class CustomCreationConverter abstract : public JsonConverter
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "T:Newtonsoft.Json.Converters.CustomCreationConverter`1"]

Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | CustomCreationConverter<(Of <(<'T>)>)>()()()() | Initializes a new instance of the CustomCreationConverter<(Of <(<'T>)>)> class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Overrides JsonConverter.CanWrite.)
 | Create(Type) | Creates an object which will then be populated by the serializer.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | CustomCreationConverter<(Of <(<'T>)>)>


CustomCreationConverter(T) Constructor

CustomCreationConverter<(Of <(<'T>)>)> Constructor
Namespaces ► Newtonsoft.Json.Converters ► CustomCreationConverter<(Of <(<'T>)>)> ► CustomCreationConverter<(Of <(<'T>)>)>()()()()
Initializes a new instance of the CustomCreationConverter<(Of <(<'T>)>)> class
Declaration Syntax
C# Visual Basic Visual C++
protected CustomCreationConverter()
Protected Sub New
protected:
CustomCreationConverter()


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► CustomCreationConverter<(Of <(<'T>)>)> ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type objectType
)
Public Overrides Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) override
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


CanWrite Property

CanWrite Property
Namespaces ► Newtonsoft.Json.Converters ► CustomCreationConverter<(Of <(<'T>)>)> ► CanWrite
Gets a value indicating whether this JsonConverter can write JSON.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanWrite { get; }
Public Overrides ReadOnly Property CanWrite As Boolean
    Get
public:
virtual property bool CanWrite {
    bool get () override;
}
Value
true if this JsonConverter can write JSON; otherwise, false.


Create Method (objectType)

Create Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► CustomCreationConverter<(Of <(<'T>)>)> ► Create(Type)
Creates an object which will then be populated by the serializer.
Declaration Syntax
C# Visual Basic Visual C++
public abstract T Create(
    Type objectType
)
Public MustOverride Function Create ( _
    objectType As Type _
) As T
public:
virtual T Create(
    Type^ objectType
) abstract
Parameters
objectType (Type)
Type of the object.
Return Value

[Missing <returns> documentation for "M:Newtonsoft.Json.Converters.CustomCreationConverter`1.Create(System.Type)"]


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► CustomCreationConverter<(Of <(<'T>)>)> ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► CustomCreationConverter<(Of <(<'T>)>)> ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


DataSetConverter Class

DataSetConverter Class
Namespaces ► Newtonsoft.Json.Converters ► DataSetConverter
Converts a DataSet to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public class DataSetConverter : JsonConverter
Public Class DataSetConverter _
    Inherits JsonConverter
public ref class DataSetConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | DataSetConverter()()()() | Initializes a new instance of the DataSetConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified value type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | DataSetConverter


DataSetConverter Constructor

DataSetConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► DataSetConverter ► DataSetConverter()()()()
Initializes a new instance of the DataSetConverter class
Declaration Syntax
C# Visual Basic Visual C++
public DataSetConverter()
Public Sub New
public:
DataSetConverter()


CanConvert Method (valueType)

CanConvert Method (valueType)
Namespaces ► Newtonsoft.Json.Converters ► DataSetConverter ► CanConvert(Type)
Determines whether this instance can convert the specified value type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type valueType
)
Public Overrides Function CanConvert ( _
    valueType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ valueType
) override
Parameters
valueType (Type)
Type of the value.
Return Value
true if this instance can convert the specified value type; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► DataSetConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► DataSetConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


DataTableConverter Class

DataTableConverter Class
Namespaces ► Newtonsoft.Json.Converters ► DataTableConverter
Converts a DataTable to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public class DataTableConverter : JsonConverter
Public Class DataTableConverter _
    Inherits JsonConverter
public ref class DataTableConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | DataTableConverter()()()() | Initializes a new instance of the DataTableConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified value type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | DataTableConverter


DataTableConverter Constructor

DataTableConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► DataTableConverter ► DataTableConverter()()()()
Initializes a new instance of the DataTableConverter class
Declaration Syntax
C# Visual Basic Visual C++
public DataTableConverter()
Public Sub New
public:
DataTableConverter()


CanConvert Method (valueType)

CanConvert Method (valueType)
Namespaces ► Newtonsoft.Json.Converters ► DataTableConverter ► CanConvert(Type)
Determines whether this instance can convert the specified value type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type valueType
)
Public Overrides Function CanConvert ( _
    valueType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ valueType
) override
Parameters
valueType (Type)
Type of the value.
Return Value
true if this instance can convert the specified value type; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► DataTableConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► DataTableConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


DateTimeConverterBase Class

DateTimeConverterBase Class
Namespaces ► Newtonsoft.Json.Converters ► DateTimeConverterBase
Provides a base class for converting a DateTime to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class DateTimeConverterBase : JsonConverter
Public MustInherit Class DateTimeConverterBase _
    Inherits JsonConverter
public ref class DateTimeConverterBase abstract : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | DateTimeConverterBase()()()() | Initializes a new instance of the DateTimeConverterBase class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Inherited from JsonConverter.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Inherited from JsonConverter.)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | DateTimeConverterBase
 |  |  | IsoDateTimeConverter
 |  |  | JavaScriptDateTimeConverter


DateTimeConverterBase Constructor

DateTimeConverterBase Constructor
Namespaces ► Newtonsoft.Json.Converters ► DateTimeConverterBase ► DateTimeConverterBase()()()()
Initializes a new instance of the DateTimeConverterBase class
Declaration Syntax
C# Visual Basic Visual C++
protected DateTimeConverterBase()
Protected Sub New
protected:
DateTimeConverterBase()


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► DateTimeConverterBase ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type objectType
)
Public Overrides Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) override
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


EntityKeyMemberConverter Class

EntityKeyMemberConverter Class
Namespaces ► Newtonsoft.Json.Converters ► EntityKeyMemberConverter
Converts an Entity Framework EntityKey to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public class EntityKeyMemberConverter : JsonConverter
Public Class EntityKeyMemberConverter _
    Inherits JsonConverter
public ref class EntityKeyMemberConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | EntityKeyMemberConverter()()()() | Initializes a new instance of the EntityKeyMemberConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | EntityKeyMemberConverter


EntityKeyMemberConverter Constructor

EntityKeyMemberConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► EntityKeyMemberConverter ► EntityKeyMemberConverter()()()()
Initializes a new instance of the EntityKeyMemberConverter class
Declaration Syntax
C# Visual Basic Visual C++
public EntityKeyMemberConverter()
Public Sub New
public:
EntityKeyMemberConverter()


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► EntityKeyMemberConverter ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type objectType
)
Public Overrides Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) override
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► EntityKeyMemberConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► EntityKeyMemberConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


ExpandoObjectConverter Class

ExpandoObjectConverter Class
Namespaces ► Newtonsoft.Json.Converters ► ExpandoObjectConverter
Converts an ExpandoObject to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public class ExpandoObjectConverter : JsonConverter
Public Class ExpandoObjectConverter _
    Inherits JsonConverter
public ref class ExpandoObjectConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | ExpandoObjectConverter()()()() | Initializes a new instance of the ExpandoObjectConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Overrides JsonConverter.CanWrite.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | ExpandoObjectConverter


ExpandoObjectConverter Constructor

ExpandoObjectConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► ExpandoObjectConverter ► ExpandoObjectConverter()()()()
Initializes a new instance of the ExpandoObjectConverter class
Declaration Syntax
C# Visual Basic Visual C++
public ExpandoObjectConverter()
Public Sub New
public:
ExpandoObjectConverter()


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► ExpandoObjectConverter ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type objectType
)
Public Overrides Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) override
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


CanWrite Property

CanWrite Property
Namespaces ► Newtonsoft.Json.Converters ► ExpandoObjectConverter ► CanWrite
Gets a value indicating whether this JsonConverter can write JSON.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanWrite { get; }
Public Overrides ReadOnly Property CanWrite As Boolean
    Get
public:
virtual property bool CanWrite {
    bool get () override;
}
Value
true if this JsonConverter can write JSON; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► ExpandoObjectConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► ExpandoObjectConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


IsoDateTimeConverter Class

IsoDateTimeConverter Class
Namespaces ► Newtonsoft.Json.Converters ► IsoDateTimeConverter
Converts a DateTime to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z).
Declaration Syntax
C# Visual Basic Visual C++
public class IsoDateTimeConverter : DateTimeConverterBase
Public Class IsoDateTimeConverter _
    Inherits DateTimeConverterBase
public ref class IsoDateTimeConverter : public DateTimeConverterBase
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | IsoDateTimeConverter()()()() | Initializes a new instance of the IsoDateTimeConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Inherited from DateTimeConverterBase.)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Culture | Gets or sets the culture used when converting a date to and from JSON.
 | DateTimeFormat | Gets or sets the date time format used when converting a date to and from JSON.
 | DateTimeStyles | Gets or sets the date time styles used when converting a date to and from JSON.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | DateTimeConverterBase
 |  |  | IsoDateTimeConverter


IsoDateTimeConverter Constructor

IsoDateTimeConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► IsoDateTimeConverter ► IsoDateTimeConverter()()()()
Initializes a new instance of the IsoDateTimeConverter class
Declaration Syntax
C# Visual Basic Visual C++
public IsoDateTimeConverter()
Public Sub New
public:
IsoDateTimeConverter()


Culture Property

Culture Property
Namespaces ► Newtonsoft.Json.Converters ► IsoDateTimeConverter ► Culture
Gets or sets the culture used when converting a date to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public CultureInfo Culture { get; set; }
Public Property Culture As CultureInfo
    Get
    Set
public:
property CultureInfo^ Culture {
    CultureInfo^ get ();
    void set (CultureInfo^ value);
}
Value
The culture used when converting a date to and from JSON.


DateTimeFormat Property

DateTimeFormat Property
Namespaces ► Newtonsoft.Json.Converters ► IsoDateTimeConverter ► DateTimeFormat
Gets or sets the date time format used when converting a date to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public string DateTimeFormat { get; set; }
Public Property DateTimeFormat As String
    Get
    Set
public:
property String^ DateTimeFormat {
    String^ get ();
    void set (String^ value);
}
Value
The date time format used when converting a date to and from JSON.


DateTimeStyles Property

DateTimeStyles Property
Namespaces ► Newtonsoft.Json.Converters ► IsoDateTimeConverter ► DateTimeStyles
Gets or sets the date time styles used when converting a date to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public DateTimeStyles DateTimeStyles { get; set; }
Public Property DateTimeStyles As DateTimeStyles
    Get
    Set
public:
property DateTimeStyles DateTimeStyles {
    DateTimeStyles get ();
    void set (DateTimeStyles value);
}
Value
The date time styles used when converting a date to and from JSON.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► IsoDateTimeConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► IsoDateTimeConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


JavaScriptDateTimeConverter Class

JavaScriptDateTimeConverter Class
Namespaces ► Newtonsoft.Json.Converters ► JavaScriptDateTimeConverter
Converts a DateTime to and from a JavaScript date constructor (e.g. new Date(52231943)).
Declaration Syntax
C# Visual Basic Visual C++
public class JavaScriptDateTimeConverter : DateTimeConverterBase
Public Class JavaScriptDateTimeConverter _
    Inherits DateTimeConverterBase
public ref class JavaScriptDateTimeConverter : public DateTimeConverterBase
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JavaScriptDateTimeConverter()()()() | Initializes a new instance of the JavaScriptDateTimeConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Inherited from DateTimeConverterBase.)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | DateTimeConverterBase
 |  |  | JavaScriptDateTimeConverter


JavaScriptDateTimeConverter Constructor

JavaScriptDateTimeConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► JavaScriptDateTimeConverter ► JavaScriptDateTimeConverter()()()()
Initializes a new instance of the JavaScriptDateTimeConverter class
Declaration Syntax
C# Visual Basic Visual C++
public JavaScriptDateTimeConverter()
Public Sub New
public:
JavaScriptDateTimeConverter()


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► JavaScriptDateTimeConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing property value of the JSON that is being converted.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► JavaScriptDateTimeConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


JsonDateTimeSerializationMode Enumeration

JsonDateTimeSerializationMode Enumeration
Namespaces ► Newtonsoft.Json.Converters ► JsonDateTimeSerializationMode
Specifies whether a DateTime object represents a local time, a Coordinated Universal Time (UTC), or is not specified as either local time or UTC.
Declaration Syntax
C# Visual Basic Visual C++
public enum JsonDateTimeSerializationMode
Public Enumeration JsonDateTimeSerializationMode
public enum class JsonDateTimeSerializationMode
Members
Member | Description
Local | The time represented is local time.
Utc | The time represented is UTC.
Unspecified | The time represented is not specified as either local time or Coordinated Universal Time (UTC).
RoundtripKind | Preserves the DateTimeKind field of a date when a DateTime object is converted to a string and the string is then converted back to a DateTime object.


KeyValuePairConverter Class

KeyValuePairConverter Class
Namespaces ► Newtonsoft.Json.Converters ► KeyValuePairConverter
Converts a KeyValuePair<(Of <(<'TKey, TValue>)>)> to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public class KeyValuePairConverter : JsonConverter
Public Class KeyValuePairConverter _
    Inherits JsonConverter
public ref class KeyValuePairConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | KeyValuePairConverter()()()() | Initializes a new instance of the KeyValuePairConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | KeyValuePairConverter


KeyValuePairConverter Constructor

KeyValuePairConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► KeyValuePairConverter ► KeyValuePairConverter()()()()
Initializes a new instance of the KeyValuePairConverter class
Declaration Syntax
C# Visual Basic Visual C++
public KeyValuePairConverter()
Public Sub New
public:
KeyValuePairConverter()


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► KeyValuePairConverter ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type objectType
)
Public Overrides Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) override
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► KeyValuePairConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► KeyValuePairConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


RegexConverter Class

RegexConverter Class
Namespaces ► Newtonsoft.Json.Converters ► RegexConverter
Converts a Regex to and from JSON and BSON.
Declaration Syntax
C# Visual Basic Visual C++
public class RegexConverter : JsonConverter
Public Class RegexConverter _
    Inherits JsonConverter
public ref class RegexConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | RegexConverter()()()() | Initializes a new instance of the RegexConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | RegexConverter


RegexConverter Constructor

RegexConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► RegexConverter ► RegexConverter()()()()
Initializes a new instance of the RegexConverter class
Declaration Syntax
C# Visual Basic Visual C++
public RegexConverter()
Public Sub New
public:
RegexConverter()


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► RegexConverter ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type objectType
)
Public Overrides Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) override
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► RegexConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► RegexConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


StringEnumConverter Class

StringEnumConverter Class
Namespaces ► Newtonsoft.Json.Converters ► StringEnumConverter
Converts an Enum to and from its name string value.
Converts an Enum to and from its name string value.
Declaration Syntax
C# Visual Basic Visual C++
public class StringEnumConverter : JsonConverter
Public Class StringEnumConverter _
    Inherits JsonConverter
public ref class StringEnumConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | StringEnumConverter()()()() | Initializes a new instance of the StringEnumConverter class
 | CamelCaseText | Gets or sets a value indicating whether the written enum text should be camel case.
 | CanConvert(Type) | Determines whether this instance can convert the specified object type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | StringEnumConverter


StringEnumConverter Constructor

StringEnumConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► StringEnumConverter ► StringEnumConverter()()()()
Initializes a new instance of the StringEnumConverter class
Declaration Syntax
C# Visual Basic Visual C++
public StringEnumConverter()
Public Sub New
public:
StringEnumConverter()


CamelCaseText Property

CamelCaseText Property
Namespaces ► Newtonsoft.Json.Converters ► StringEnumConverter ► CamelCaseText
Gets or sets a value indicating whether the written enum text should be camel case.
Declaration Syntax
C# Visual Basic Visual C++
public bool CamelCaseText { get; set; }
Public Property CamelCaseText As Boolean
    Get
    Set
public:
property bool CamelCaseText {
    bool get ();
    void set (bool value);
}
Value
true if the written enum text will be camel case; otherwise, false.


CanConvert Method (objectType)

CanConvert Method (objectType)
Namespaces ► Newtonsoft.Json.Converters ► StringEnumConverter ► CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type objectType
)
Public Overrides Function CanConvert ( _
    objectType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ objectType
) override
Parameters
objectType (Type)
Type of the object.
Return Value
true if this instance can convert the specified object type; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► StringEnumConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► StringEnumConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


XmlNodeConverter Class

XmlNodeConverter Class
Namespaces ► Newtonsoft.Json.Converters ► XmlNodeConverter
Converts XML to and from JSON.
Declaration Syntax
C# Visual Basic Visual C++
public class XmlNodeConverter : JsonConverter
Public Class XmlNodeConverter _
    Inherits JsonConverter
public ref class XmlNodeConverter : public JsonConverter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | XmlNodeConverter()()()() | Initializes a new instance of the XmlNodeConverter class
 | CanConvert(Type) | Determines whether this instance can convert the specified value type. (Overrides JsonConverter.CanConvert(Type).)
 | CanRead | Gets a value indicating whether this JsonConverter can read JSON. (Inherited from JsonConverter.)
 | CanWrite | Gets a value indicating whether this JsonConverter can write JSON. (Inherited from JsonConverter.)
 | DeserializeRootElementName | Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema()()()() | Gets the JsonSchema of the JSON produced by the JsonConverter. (Inherited from JsonConverter.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OmitRootObject | Gets or sets a value indicating whether to write the root JSON object.
 | ReadJson(JsonReader, Type, Object, JsonSerializer) | Reads the JSON representation of the object. (Overrides JsonConverter.ReadJson(JsonReader, Type, Object, JsonSerializer).)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | WriteArrayAttribute | Gets or sets a flag to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON.
 | WriteJson(JsonWriter, Object, JsonSerializer) | Writes the JSON representation of the object. (Overrides JsonConverter.WriteJson(JsonWriter, Object, JsonSerializer).)
Inheritance Hierarchy
Object
 | JsonConverter
 |  | XmlNodeConverter


XmlNodeConverter Constructor

XmlNodeConverter Constructor
Namespaces ► Newtonsoft.Json.Converters ► XmlNodeConverter ► XmlNodeConverter()()()()
Initializes a new instance of the XmlNodeConverter class
Declaration Syntax
C# Visual Basic Visual C++
public XmlNodeConverter()
Public Sub New
public:
XmlNodeConverter()


CanConvert Method (valueType)

CanConvert Method (valueType)
Namespaces ► Newtonsoft.Json.Converters ► XmlNodeConverter ► CanConvert(Type)
Determines whether this instance can convert the specified value type.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanConvert(
    Type valueType
)
Public Overrides Function CanConvert ( _
    valueType As Type _
) As Boolean
public:
virtual bool CanConvert(
    Type^ valueType
) override
Parameters
valueType (Type)
Type of the value.
Return Value
true if this instance can convert the specified value type; otherwise, false.


DeserializeRootElementName Property

DeserializeRootElementName Property
Namespaces ► Newtonsoft.Json.Converters ► XmlNodeConverter ► DeserializeRootElementName
Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements.
Declaration Syntax
C# Visual Basic Visual C++
public string DeserializeRootElementName { get; set; }
Public Property DeserializeRootElementName As String
    Get
    Set
public:
property String^ DeserializeRootElementName {
    String^ get ();
    void set (String^ value);
}
Value
The name of the deserialize root element.


OmitRootObject Property

OmitRootObject Property
Namespaces ► Newtonsoft.Json.Converters ► XmlNodeConverter ► OmitRootObject
Gets or sets a value indicating whether to write the root JSON object.
Declaration Syntax
C# Visual Basic Visual C++
public bool OmitRootObject { get; set; }
Public Property OmitRootObject As Boolean
    Get
    Set
public:
property bool OmitRootObject {
    bool get ();
    void set (bool value);
}
Value
true if the JSON root object is omitted; otherwise, false.


ReadJson Method (reader, objectType, existingValue, serializer)

ReadJson Method (reader, objectType, existingValue, serializer)
Namespaces ► Newtonsoft.Json.Converters ► XmlNodeConverter ► ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override Object ReadJson(
    JsonReader reader,
    Type objectType,
    Object existingValue,
    JsonSerializer serializer
)
Public Overrides Function ReadJson ( _
    reader As JsonReader, _
    objectType As Type, _
    existingValue As Object, _
    serializer As JsonSerializer _
) As Object
public:
virtual Object^ ReadJson(
    JsonReader^ reader,
    Type^ objectType,
    Object^ existingValue,
    JsonSerializer^ serializer
) override
Parameters
reader (JsonReader)
The JsonReader to read from.
objectType (Type)
Type of the object.
existingValue (Object)
The existing value of object being read.
serializer (JsonSerializer)
The calling serializer.
Return Value
The object value.


WriteArrayAttribute Property

WriteArrayAttribute Property
Namespaces ► Newtonsoft.Json.Converters ► XmlNodeConverter ► WriteArrayAttribute
Gets or sets a flag to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON.
Declaration Syntax
C# Visual Basic Visual C++
public bool WriteArrayAttribute { get; set; }
Public Property WriteArrayAttribute As Boolean
    Get
    Set
public:
property bool WriteArrayAttribute {
    bool get ();
    void set (bool value);
}
Value
true if the array attibute is written to the XML; otherwise, false.


WriteJson Method (writer, value, serializer)

WriteJson Method (writer, value, serializer)
Namespaces ► Newtonsoft.Json.Converters ► XmlNodeConverter ► WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteJson(
    JsonWriter writer,
    Object value,
    JsonSerializer serializer
)
Public Overrides Sub WriteJson ( _
    writer As JsonWriter, _
    value As Object, _
    serializer As JsonSerializer _
)
public:
virtual void WriteJson(
    JsonWriter^ writer,
    Object^ value,
    JsonSerializer^ serializer
) override
Parameters
writer (JsonWriter)
The JsonWriter to write to.
value (Object)
The value.
serializer (JsonSerializer)
The calling serializer.


Newtonsoft.Json.Linq Namespace

Newtonsoft.Json.Linq Namespace
Namespaces ► Newtonsoft.Json.Linq
The Newtonsoft.Json.Linq namespace provides classes that are used to implement LINQ to JSON.
Declaration Syntax
C# Visual Basic Visual C++
namespace Newtonsoft.Json.Linq
Namespace Newtonsoft.Json.Linq
namespace Newtonsoft.Json.Linq
Types
All Types Classes Structures Interfaces Enumerations
Icon | Type | Description
 | Extensions | Contains the LINQ to JSON extension methods.
 | IJEnumerable<(Of <(<'T>)>)> | Represents a collection of JToken objects.
 | JArray | Represents a JSON array.
 | JConstructor | Represents a JSON constructor.
 | JContainer | Represents a token that can contain other tokens.
 | JEnumerable<(Of <(<'T>)>)> | Represents a collection of JToken objects.
 | JObject | Represents a JSON object.
 | JProperty | Represents a JSON property.
 | JRaw | Represents a raw JSON string.
 | JToken | Represents an abstract JSON token.
 | JTokenEqualityComparer | Compares tokens to determine whether they are equal.
 | JTokenReader | Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
 | JTokenType | Specifies the type of token.
 | JTokenWriter | Represents a writer that provides a fast, non-cached, forward-only way of generating Json data.
 | JValue | Represents a value in JSON (string, integer, date, etc).


Extensions Class

Extensions Class
Namespaces ► Newtonsoft.Json.Linq ► Extensions
Contains the LINQ to JSON extension methods.
Declaration Syntax
C# Visual Basic Visual C++
public static class Extensions
<ExtensionAttribute> _
Public NotInheritable Class Extensions
[ExtensionAttribute]
public ref class Extensions abstract sealed
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the ancestors of every token in the source collection.
 | AsJEnumerable(IEnumerable<(Of <<'(JToken>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection.
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection.
 | Descendants<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the descendants of every token in the source collection.
 | Properties(IEnumerable<(Of <<'(JObject>)>>)) | Returns a collection of child properties of every object in the source collection.
 | Value<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Converts the value.
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value.
 | Values(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of child values of every object in the source collection with the given key.
 | Values(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of child values of every object in the source collection.
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of converted child values of every object in the source collection with the given key.
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of converted child values of every object in the source collection.
Inheritance Hierarchy
Object
Extensions


Ancestors Method (source)

Ancestors<(Of <(<'T>)>)> Method (source)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Returns a collection of tokens that contains the ancestors of every token in the source collection.
Declaration Syntax
C# Visual Basic Visual C++
public static IJEnumerable<JToken> Ancestors<T>(
    this IEnumerable<T> source
)
where T : JToken

<ExtensionAttribute> _
Public Shared Function Ancestors(Of T As JToken) ( _
    source As IEnumerable(Of T) _
) As IJEnumerable(Of JToken)
[ExtensionAttribute]
public:
generic<typename T>
where T : JToken
static IJEnumerable<JToken^>^ Ancestors(
    IEnumerable<T>^ source
)
Generic Template Parameters
T
The type of the objects in source, constrained to JToken.
Parameters
source (IEnumerable <(Of <(<'T>)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
Return Value
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the ancestors of every node in the source collection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter.


AsJEnumerable Method

AsJEnumerable Method
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► AsJEnumerable()()()()
Members
Icon | Member | Description
 | AsJEnumerable(IEnumerable<(Of <<'(JToken>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.


AsJEnumerable Method (source)

AsJEnumerable Method (source)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► AsJEnumerable(IEnumerable<(Of <<'(JToken>)>>))
Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static IJEnumerable<JToken> AsJEnumerable(
    this IEnumerable<JToken> source
)
<ExtensionAttribute> _
Public Shared Function AsJEnumerable ( _
    source As IEnumerable(Of JToken) _
) As IJEnumerable(Of JToken)
[ExtensionAttribute]
public:
static IJEnumerable<JToken^>^ AsJEnumerable(
    IEnumerable<JToken^>^ source
)
Parameters
source (IEnumerable <(Of <(<' JToken >)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
Return Value
The input typed as IJEnumerable<(Of <(<'T>)>)>.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<' JToken >)>)>. When you use instance method syntax to call this method, omit the first parameter.


AsJEnumerable Method (source)

AsJEnumerable<(Of <(<'T>)>)> Method (source)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static IJEnumerable<T> AsJEnumerable<T>(
    this IEnumerable<T> source
)
where T : JToken

<ExtensionAttribute> _
Public Shared Function AsJEnumerable(Of T As JToken) ( _
    source As IEnumerable(Of T) _
) As IJEnumerable(Of T)
[ExtensionAttribute]
public:
generic<typename T>
where T : JToken
static IJEnumerable<T>^ AsJEnumerable(
    IEnumerable<T>^ source
)
Generic Template Parameters
T
The source collection type.
Parameters
source (IEnumerable <(Of <(<'T>)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
Return Value
The input typed as IJEnumerable<(Of <(<'T>)>)>.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter.


Children Method

Children Method
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Children()()()()
Members
Icon | Member | Description
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection.
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection.


Children Method (source)

Children<(Of <(<'T>)>)> Method (source)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Returns a collection of child tokens of every array in the source collection.
Declaration Syntax
C# Visual Basic Visual C++
public static IJEnumerable<JToken> Children<T>(
    this IEnumerable<T> source
)
where T : JToken

<ExtensionAttribute> _
Public Shared Function Children(Of T As JToken) ( _
    source As IEnumerable(Of T) _
) As IJEnumerable(Of JToken)
[ExtensionAttribute]
public:
generic<typename T>
where T : JToken
static IJEnumerable<JToken^>^ Children(
    IEnumerable<T>^ source
)
Generic Template Parameters
T
The source collection type.
Parameters
source (IEnumerable <(Of <(<'T>)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
Return Value
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the values of every node in the source collection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter.


Children Method (source)

Children<(Of <(<'T, U>)>)> Method (source)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>))
Returns a collection of converted child tokens of every array in the source collection.
Declaration Syntax
C# Visual Basic Visual C++
public static IEnumerable<U> Children<T, U>(
    this IEnumerable<T> source
)
where T : JToken

<ExtensionAttribute> _
Public Shared Function Children(Of T As JToken, U) ( _
    source As IEnumerable(Of T) _
) As IEnumerable(Of U)
[ExtensionAttribute]
public:
generic<typename T, typename U>
where T : JToken
static IEnumerable<U>^ Children(
    IEnumerable<T>^ source
)
Generic Template Parameters
T
The source collection type.
U
The type to convert the values to.
Parameters
source (IEnumerable <(Of <(<'T>)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
Return Value
An IEnumerable<(Of <(<'T>)>)> that contains the converted values of every node in the source collection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter.


Descendants Method (source)

Descendants<(Of <(<'T>)>)> Method (source)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Descendants<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Returns a collection of tokens that contains the descendants of every token in the source collection.
Declaration Syntax
C# Visual Basic Visual C++
public static IJEnumerable<JToken> Descendants<T>(
    this IEnumerable<T> source
)
where T : JContainer

<ExtensionAttribute> _
Public Shared Function Descendants(Of T As JContainer) ( _
    source As IEnumerable(Of T) _
) As IJEnumerable(Of JToken)
[ExtensionAttribute]
public:
generic<typename T>
where T : JContainer
static IJEnumerable<JToken^>^ Descendants(
    IEnumerable<T>^ source
)
Generic Template Parameters
T
The type of the objects in source, constrained to JContainer.
Parameters
source (IEnumerable <(Of <(<'T>)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
Return Value
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the descendants of every node in the source collection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter.


Properties Method (source)

Properties Method (source)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Properties(IEnumerable<(Of <<'(JObject>)>>))
Returns a collection of child properties of every object in the source collection.
Declaration Syntax
C# Visual Basic Visual C++
public static IJEnumerable<JProperty> Properties(
    this IEnumerable<JObject> source
)
<ExtensionAttribute> _
Public Shared Function Properties ( _
    source As IEnumerable(Of JObject) _
) As IJEnumerable(Of JProperty)
[ExtensionAttribute]
public:
static IJEnumerable<JProperty^>^ Properties(
    IEnumerable<JObject^>^ source
)
Parameters
source (IEnumerable <(Of <(<' JObject >)>)>)
An IEnumerable<(Of <(<'T>)>)> of JObject that contains the source collection.
Return Value
An IEnumerable<(Of <(<'T>)>)> of JProperty that contains the properties of every object in the source collection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<' JObject >)>)>. When you use instance method syntax to call this method, omit the first parameter.


Value Method

Value Method
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Value()()()()
Members
Icon | Member | Description
 | Value<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Converts the value.
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value.


Value Method (value)

Value<(Of <(<'U>)>)> Method (value)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Value<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>))
Converts the value.
Declaration Syntax
C# Visual Basic Visual C++
public static U Value<U>(
    this IEnumerable<JToken> value
)

<ExtensionAttribute> _
Public Shared Function Value(Of U) ( _
    value As IEnumerable(Of JToken) _
) As U
[ExtensionAttribute]
public:
generic<typename U>
static U Value(
    IEnumerable<JToken^>^ value
)
Generic Template Parameters
U
The type to convert the value to.
Parameters
value (IEnumerable <(Of <(<' JToken >)>)>)
A JToken cast as a IEnumerable<(Of <(<'T>)>)> of JToken.
Return Value
A converted value.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<' JToken >)>)>. When you use instance method syntax to call this method, omit the first parameter.


Value Method (value)

Value<(Of <(<'T, U>)>)> Method (value)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>))
Converts the value.
Declaration Syntax
C# Visual Basic Visual C++
public static U Value<T, U>(
    this IEnumerable<T> value
)
where T : JToken

<ExtensionAttribute> _
Public Shared Function Value(Of T As JToken, U) ( _
    value As IEnumerable(Of T) _
) As U
[ExtensionAttribute]
public:
generic<typename T, typename U>
where T : JToken
static U Value(
    IEnumerable<T>^ value
)
Generic Template Parameters
T
The source collection type.
U
The type to convert the value to.
Parameters
value (IEnumerable <(Of <(<'T>)>)>)
A JToken cast as a IEnumerable<(Of <(<'T>)>)> of JToken.
Return Value
A converted value.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter.


Values Method

Values Method
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Values()()()()
Members
Icon | Member | Description
 | Values(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of child values of every object in the source collection with the given key.
 | Values(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of child values of every object in the source collection.
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of converted child values of every object in the source collection with the given key.
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of converted child values of every object in the source collection.


Values Method (source)

Values Method (source)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Values(IEnumerable<(Of <<'(JToken>)>>))
Returns a collection of child values of every object in the source collection.
Declaration Syntax
C# Visual Basic Visual C++
public static IJEnumerable<JToken> Values(
    this IEnumerable<JToken> source
)
<ExtensionAttribute> _
Public Shared Function Values ( _
    source As IEnumerable(Of JToken) _
) As IJEnumerable(Of JToken)
[ExtensionAttribute]
public:
static IJEnumerable<JToken^>^ Values(
    IEnumerable<JToken^>^ source
)
Parameters
source (IEnumerable <(Of <(<' JToken >)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
Return Value
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the values of every node in the source collection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<' JToken >)>)>. When you use instance method syntax to call this method, omit the first parameter.


Values Method (source)

Values<(Of <(<'U>)>)> Method (source)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>))
Returns a collection of converted child values of every object in the source collection.
Declaration Syntax
C# Visual Basic Visual C++
public static IEnumerable<U> Values<U>(
    this IEnumerable<JToken> source
)

<ExtensionAttribute> _
Public Shared Function Values(Of U) ( _
    source As IEnumerable(Of JToken) _
) As IEnumerable(Of U)
[ExtensionAttribute]
public:
generic<typename U>
static IEnumerable<U>^ Values(
    IEnumerable<JToken^>^ source
)
Generic Template Parameters
U
The type to convert the values to.
Parameters
source (IEnumerable <(Of <(<' JToken >)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
Return Value
An IEnumerable<(Of <(<'T>)>)> that contains the converted values of every node in the source collection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<' JToken >)>)>. When you use instance method syntax to call this method, omit the first parameter.


Values Method (source, key)

Values<(Of <(<'U>)>)> Method (source, key)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>), Object)
Returns a collection of converted child values of every object in the source collection with the given key.
Declaration Syntax
C# Visual Basic Visual C++
public static IEnumerable<U> Values<U>(
    this IEnumerable<JToken> source,
    Object key
)

<ExtensionAttribute> _
Public Shared Function Values(Of U) ( _
    source As IEnumerable(Of JToken), _
    key As Object _
) As IEnumerable(Of U)
[ExtensionAttribute]
public:
generic<typename U>
static IEnumerable<U>^ Values(
    IEnumerable<JToken^>^ source,
    Object^ key
)
Generic Template Parameters
U
The type to convert the values to.
Parameters
source (IEnumerable <(Of <(<' JToken >)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
key (Object)
The token key.
Return Value
An IEnumerable<(Of <(<'T>)>)> that contains the converted values of every node in the source collection with the given key.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<' JToken >)>)>. When you use instance method syntax to call this method, omit the first parameter.


Values Method (source, key)

Values Method (source, key)
Namespaces ► Newtonsoft.Json.Linq ► Extensions ► Values(IEnumerable<(Of <<'(JToken>)>>), Object)
Returns a collection of child values of every object in the source collection with the given key.
Declaration Syntax
C# Visual Basic Visual C++
public static IJEnumerable<JToken> Values(
    this IEnumerable<JToken> source,
    Object key
)
<ExtensionAttribute> _
Public Shared Function Values ( _
    source As IEnumerable(Of JToken), _
    key As Object _
) As IJEnumerable(Of JToken)
[ExtensionAttribute]
public:
static IJEnumerable<JToken^>^ Values(
    IEnumerable<JToken^>^ source,
    Object^ key
)
Parameters
source (IEnumerable <(Of <(<' JToken >)>)>)
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the source collection.
key (Object)
The token key.
Return Value
An IEnumerable<(Of <(<'T>)>)> of JToken that contains the values of every node in the source collection with the given key.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable <(Of <(<' JToken >)>)>. When you use instance method syntax to call this method, omit the first parameter.


IJEnumerable(T) Interface

IJEnumerable<(Of <(<'T>)>)> Interface
Namespaces ► Newtonsoft.Json.Linq ► IJEnumerable<(Of <(<'T>)>)>
Represents a collection of JToken objects.
Declaration Syntax
C# Visual Basic Visual C++
public interface IJEnumerable<out T> : IEnumerable<T>,
    IEnumerable
where T : JToken

Public Interface IJEnumerable(Of Out T As JToken) _
    Inherits IEnumerable(Of T), IEnumerable
generic<typename T>
where T : JToken
public interface class IJEnumerable : IEnumerable<T>,
    IEnumerable
Generic Template Parameters
T
The type of token
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the ancestors of every token in the source collection. (Inherited from Extensions.)
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>. (Inherited from Extensions.)
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection. (Inherited from Extensions.)
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection. (Inherited from Extensions.)
 | GetEnumerator()()()() | Returns an enumerator that iterates through the collection. (Inherited from IEnumerable <(Of <(<'T>)>)>.)
 | GetEnumerator()()()() | Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.)
 | Item[([( Object])]) | Gets the IJEnumerable<(Of <(<'T>)>)> with the specified key.
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value. (Inherited from Extensions.)


Item Property (key)

Item Property (key)
Namespaces ► Newtonsoft.Json.Linq ► IJEnumerable<(Of <(<'T>)>)> ► Item[([( Object])])
Gets the IJEnumerable<(Of <(<'T>)>)> with the specified key.
Declaration Syntax
C# Visual Basic Visual C++
IJEnumerable<JToken> this[
    Object key
] { get; }
ReadOnly Default Property Item ( _
    key As Object _
) As IJEnumerable(Of JToken)
    Get
property IJEnumerable<JToken^>^ default[Object^ key] {
    IJEnumerable<JToken^>^ get (Object^ key);
}
Parameters
key (Object)
Value


JArray Class

JArray Class
Namespaces ► Newtonsoft.Json.Linq ► JArray
Represents a JSON array.
Declaration Syntax
C# Visual Basic Visual C++
public class JArray : JContainer, IList<JToken>,
    ICollection<JToken>, IEnumerable<JToken>, IEnumerable
Public Class JArray _
    Inherits JContainer _
    Implements IList(Of JToken), ICollection(Of JToken),  _
    IEnumerable(Of JToken), IEnumerable
public ref class JArray : public JContainer,
    IList<JToken^>, ICollection<JToken^>, IEnumerable<JToken^>,
    IEnumerable
Members
All Members | Constructors | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JArray()()()() | Initializes a new instance of the JArray class.
 | JArray(JArray) | Initializes a new instance of the JArray class from another JArray object.
 | JArray(array<Object>[]()[][]) | Initializes a new instance of the JArray class with the specified content.
 | JArray(Object) | Initializes a new instance of the JArray class with the specified content.
 | Add(JToken) | Adds an item to the ICollection<(Of <(<'T>)>)>.
 | Add(Object) | Adds the specified content as children of this JToken. (Inherited from JContainer.)
 | AddAfterSelf(Object) | Adds the specified content immediately after this token. (Inherited from JToken.)
 | AddBeforeSelf(Object) | Adds the specified content immediately before this token. (Inherited from JToken.)
 | AddFirst(Object) | Adds the specified content as the first children of this JToken. (Inherited from JContainer.)
 | AddingNew | Occurs before an item is added to the collection. (Inherited from JContainer.)
 | AfterSelf()()()() | Returns a collection of the sibling tokens after this token, in document order. (Inherited from JToken.)
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token. (Inherited from JToken.)
 | Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the ancestors of every token in the source collection. (Inherited from Extensions.)
 | AsJEnumerable(IEnumerable<(Of <<'(JToken>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>. (Inherited from Extensions.)
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>. (Inherited from Extensions.)
 | BeforeSelf()()()() | Returns a collection of the sibling tokens before this token, in document order. (Inherited from JToken.)
 | Children()()()() | Returns a collection of the child tokens of this token, in document order. (Inherited from JContainer.)
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection. (Inherited from Extensions.)
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection. (Inherited from Extensions.)
 | Clear()()()() | Removes all items from the ICollection<(Of <(<'T>)>)>.
 | CollectionChanged | Occurs when the items list of the collection has changed, or the collection is reset. (Inherited from JContainer.)
 | Contains(JToken) | Determines whether the ICollection<(Of <(<'T>)>)> contains a specific value.
 | Count | Gets the number of elements contained in the ICollection<(Of <(<'T>)>)>.
 | CreateReader()()()() | Creates an JsonReader for this token. (Inherited from JToken.)
 | CreateWriter()()()() | Creates an JsonWriter that can be used to add tokens to the JToken. (Inherited from JContainer.)
 | DeepClone()()()() | Creates a new instance of the JToken. All child tokens are recursively cloned. (Inherited from JToken.)
 | Descendants()()()() | Returns a collection of the descendant tokens for this token in document order. (Inherited from JContainer.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | First | Get the first child token of this token. (Inherited from JContainer.)
 | FromObject(Object) | Creates a JArray from an object.
 | FromObject(Object, JsonSerializer) | Creates a JArray from an object.
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetMetaObject(Expression) | Returns the DynamicMetaObject responsible for binding operations performed on this object. (Inherited from JToken.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HasValues | Gets a value indicating whether this token has childen tokens. (Inherited from JContainer.)
 | IndexOf(JToken) | Determines the index of a specific item in the IList<(Of <(<'T>)>)>.
 | Insert(Int32, JToken) | Inserts an item to the IList<(Of <(<'T>)>)> at the specified index.
 | IsValid(JToken, JsonSchema) | Determines whether the JToken is valid. (Inherited from Extensions.)
 | Item[([( Object])]) | Gets the JToken with the specified key. (Overrides JToken.Item[([( Object])]) .)
 | Item[([( Int32])]) | Gets or sets the JToken at the specified index.
 | Last | Get the last child token of this token. (Inherited from JContainer.)
 | ListChanged | Occurs when the list changes or an item in the list changes. (Inherited from JContainer.)
 | Load(JsonReader) | Loads an JArray from a JsonReader.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Next | Gets the next sibling token of this node. (Inherited from JToken.)
 | OnAddingNew(AddingNewEventArgs) | Raises the AddingNew event. (Inherited from JContainer.)
 | OnCollectionChanged(NotifyCollectionChangedEventArgs) | Raises the CollectionChanged event. (Inherited from JContainer.)
 | OnListChanged(ListChangedEventArgs) | Raises the ListChanged event. (Inherited from JContainer.)
 | Parent | Gets or sets the parent. (Inherited from JToken.)
 | Parse(String) | Load a JArray from a string that contains JSON.
 | Previous | Gets the previous sibling token of this node. (Inherited from JToken.)
 | Remove(JToken) | Removes the first occurrence of a specific object from the ICollection<(Of <(<'T>)>)>.
 | Remove()()()() | Removes this token from its parent. (Inherited from JToken.)
 | RemoveAll()()()() | Removes the child nodes from this token. (Inherited from JContainer.)
 | RemoveAt(Int32) | Removes the IList<(Of <(<'T>)>)> item at the specified index.
 | Replace(JToken) | Replaces this token with the specified token. (Inherited from JToken.)
 | ReplaceAll(Object) | Replaces the children nodes of this token with the specified content. (Inherited from JContainer.)
 | Root | Gets the root JToken of this JToken. (Inherited from JToken.)
 | SelectToken(String) | Selects the token that matches the object path. (Inherited from JToken.)
 | SelectToken(String, Boolean) | Selects the token that matches the object path. (Inherited from JToken.)
 | ToString()()()() | Returns the indented JSON for this token. (Inherited from JToken.)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters. (Inherited from JToken.)
 | Type | Gets the node type for this JToken. (Overrides JToken.Type.)
 | Validate(JToken, JsonSchema) | Validates the specified JToken. (Inherited from Extensions.)
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken. (Inherited from Extensions.)
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type. (Inherited from JToken.)
 | Value<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Converts the value. (Inherited from Extensions.)
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value. (Inherited from Extensions.)
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order. (Inherited from JContainer.)
 | Values(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of child values of every object in the source collection with the given key. (Inherited from Extensions.)
 | Values(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of child values of every object in the source collection. (Inherited from Extensions.)
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of converted child values of every object in the source collection with the given key. (Inherited from Extensions.)
 | WriteTo(JsonWriter, array<JsonConverter>[]()[][]) | Writes this token to a JsonWriter. (Overrides JToken.WriteTo(JsonWriter, array<JsonConverter>[]()[][]).)
Inheritance Hierarchy
Object
 | JToken
 |  | JContainer
 |  |  | JArray


JArray Constructor

JArray Constructor
Namespaces ► Newtonsoft.Json.Linq ► JArray ► JArray()()()()
Members
Icon | Member | Description
 | JArray()()()() | Initializes a new instance of the JArray class.
 | JArray(JArray) | Initializes a new instance of the JArray class from another JArray object.
 | JArray(array<Object>[]()[][]) | Initializes a new instance of the JArray class with the specified content.
 | JArray(Object) | Initializes a new instance of the JArray class with the specified content.


JArray Constructor

JArray Constructor
Namespaces ► Newtonsoft.Json.Linq ► JArray ► JArray()()()()
Initializes a new instance of the JArray class.
Declaration Syntax
C# Visual Basic Visual C++
public JArray()
Public Sub New
public:
JArray()


JArray Constructor (other)

JArray Constructor (other)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► JArray(JArray)
Initializes a new instance of the JArray class from another JArray object.
Declaration Syntax
C# Visual Basic Visual C++
public JArray(
    JArray other
)
Public Sub New ( _
    other As JArray _
)
public:
JArray(
    JArray^ other
)
Parameters
other (JArray)
A JArray object to copy from.


JArray Constructor (content)

JArray Constructor (content)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► JArray(Object)
Initializes a new instance of the JArray class with the specified content.
Declaration Syntax
C# Visual Basic Visual C++
public JArray(
    Object content
)
Public Sub New ( _
    content As Object _
)
public:
JArray(
    Object^ content
)
Parameters
content (Object)
The contents of the array.


JArray Constructor (content)

JArray Constructor (content)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► JArray(array<Object>[]()[][])
Initializes a new instance of the JArray class with the specified content.
Declaration Syntax
C# Visual Basic Visual C++
public JArray(
    params Object[] content
)
Public Sub New ( _
    ParamArray content As Object() _
)
public:
JArray(
    ... array<Object^>^ content
)
Parameters
content (array< Object >[]()[][])
The contents of the array.


Add Method (item)

Add Method (item)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Add(JToken)
Adds an item to the ICollection<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public void Add(
    JToken item
)
Public Sub Add ( _
    item As JToken _
)
public:
virtual void Add(
    JToken^ item
) sealed
Parameters
item (JToken)
The object to add to the ICollection<(Of <(<'T>)>)>.
Exceptions
Exception | Condition
NotSupportedException | The ICollection<(Of <(<'T>)>)> is read-only.


Clear Method

Clear Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Clear()()()()
Removes all items from the ICollection<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public void Clear()
Public Sub Clear
public:
virtual void Clear() sealed
Exceptions
Exception | Condition
NotSupportedException | The ICollection<(Of <(<'T>)>)> is read-only.


Contains Method (item)

Contains Method (item)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Contains(JToken)
Determines whether the ICollection<(Of <(<'T>)>)> contains a specific value.
Declaration Syntax
C# Visual Basic Visual C++
public bool Contains(
    JToken item
)
Public Function Contains ( _
    item As JToken _
) As Boolean
public:
virtual bool Contains(
    JToken^ item
) sealed
Parameters
item (JToken)
The object to locate in the ICollection<(Of <(<'T>)>)>.
Return Value
true if item is found in the ICollection<(Of <(<'T>)>)>; otherwise, false.


Count Property

Count Property
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Count
Gets the number of elements contained in the ICollection<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public int Count { get; }
Public ReadOnly Property Count As Integer
    Get
public:
virtual property int Count {
    int get () sealed;
}
Value
Return Value
The number of elements contained in the ICollection<(Of <(<'T>)>)>.


FromObject Method

FromObject Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► FromObject()()()()
Members
Icon | Member | Description
 | FromObject(Object) | Creates a JArray from an object.
 | FromObject(Object, JsonSerializer) | Creates a JArray from an object.


FromObject Method (o)

FromObject Method (o)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► FromObject(Object)
Creates a JArray from an object.
Declaration Syntax
C# Visual Basic Visual C++
public static JArray FromObject(
    Object o
)
Public Shared Function FromObject ( _
    o As Object _
) As JArray
public:
static JArray^ FromObject(
    Object^ o
)
Parameters
o (Object)
The object that will be used to create JArray.
Return Value
A JArray with the values of the specified object


FromObject Method (o, jsonSerializer)

FromObject Method (o, jsonSerializer)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► FromObject(Object, JsonSerializer)
Creates a JArray from an object.
Declaration Syntax
C# Visual Basic Visual C++
public static JArray FromObject(
    Object o,
    JsonSerializer jsonSerializer
)
Public Shared Function FromObject ( _
    o As Object, _
    jsonSerializer As JsonSerializer _
) As JArray
public:
static JArray^ FromObject(
    Object^ o,
    JsonSerializer^ jsonSerializer
)
Parameters
o (Object)
The object that will be used to create JArray.
jsonSerializer (JsonSerializer)
The JsonSerializer that will be used to read the object.
Return Value
A JArray with the values of the specified object


IndexOf Method (item)

IndexOf Method (item)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► IndexOf(JToken)
Determines the index of a specific item in the IList<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public int IndexOf(
    JToken item
)
Public Function IndexOf ( _
    item As JToken _
) As Integer
public:
virtual int IndexOf(
    JToken^ item
) sealed
Parameters
item (JToken)
The object to locate in the IList<(Of <(<'T>)>)>.
Return Value
The index of item if found in the list; otherwise, -1.


Insert Method (index, item)

Insert Method (index, item)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Insert(Int32, JToken)
Inserts an item to the IList<(Of <(<'T>)>)> at the specified index.
Declaration Syntax
C# Visual Basic Visual C++
public void Insert(
    int index,
    JToken item
)
Public Sub Insert ( _
    index As Integer, _
    item As JToken _
)
public:
virtual void Insert(
    int index,
    JToken^ item
) sealed
Parameters
index (Int32)
The zero-based index at which item should be inserted.
item (JToken)
The object to insert into the IList<(Of <(<'T>)>)>.
Exceptions
Exception | Condition
ArgumentOutOfRangeException | index is not a valid index in the IList<(Of <(<'T>)>)>.
NotSupportedException | The IList<(Of <(<'T>)>)> is read-only.


Item Property

Item Property
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Item
Members
Icon | Member | Description
 | Item[([( Object])]) | Gets the JToken with the specified key. (Overrides JToken.Item[([( Object])]) .)
 | Item[([( Int32])]) | Gets or sets the JToken at the specified index.


Item Property (index)

Item Property (index)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Item[([( Int32])])
Gets or sets the JToken at the specified index.
Declaration Syntax
C# Visual Basic Visual C++
public JToken this[
    int index
] { get; set; }
Public Default Property Item ( _
    index As Integer _
) As JToken
    Get
    Set
public:
virtual property JToken^ default[int index] {
    JToken^ get (int index) sealed;
    void set (int index, JToken^ value) sealed;
}
Parameters
index (Int32)
Value


Item Property (key)

Item Property (key)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Item[([( Object])])
Gets the JToken with the specified key.
Declaration Syntax
C# Visual Basic Visual C++
public override JToken this[
    Object key
] { get; set; }
Public Overrides Default Property Item ( _
    key As Object _
) As JToken
    Get
    Set
public:
virtual property JToken^ default[Object^ key] {
    JToken^ get (Object^ key) override;
    void set (Object^ key, JToken^ value) override;
}
Parameters
key (Object)
Value
The JToken with the specified key.


Load Method (reader)

Load Method (reader)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Load(JsonReader)
Loads an JArray from a JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public static JArray Load(
    JsonReader reader
)
Public Shared Function Load ( _
    reader As JsonReader _
) As JArray
public:
static JArray^ Load(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
A JsonReader that will be read for the content of the JArray.
Return Value
A JArray that contains the JSON that was read from the specified JsonReader.


Parse Method (json)

Parse Method (json)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Parse(String)
Load a JArray from a string that contains JSON.
Declaration Syntax
C# Visual Basic Visual C++
public static JArray Parse(
    string json
)
Public Shared Function Parse ( _
    json As String _
) As JArray
public:
static JArray^ Parse(
    String^ json
)
Parameters
json (String)
A String that contains JSON.
Return Value
A JArray populated from the string that contains JSON.


Remove Method (item)

Remove Method (item)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Remove(JToken)
Removes the first occurrence of a specific object from the ICollection<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public bool Remove(
    JToken item
)
Public Function Remove ( _
    item As JToken _
) As Boolean
public:
virtual bool Remove(
    JToken^ item
) sealed
Parameters
item (JToken)
The object to remove from the ICollection<(Of <(<'T>)>)>.
Return Value
true if item was successfully removed from the ICollection<(Of <(<'T>)>)>; otherwise, false. This method also returns false if item is not found in the original ICollection<(Of <(<'T>)>)>.
Exceptions
Exception | Condition
NotSupportedException | The ICollection<(Of <(<'T>)>)> is read-only.


RemoveAt Method (index)

RemoveAt Method (index)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► RemoveAt(Int32)
Removes the IList<(Of <(<'T>)>)> item at the specified index.
Declaration Syntax
C# Visual Basic Visual C++
public void RemoveAt(
    int index
)
Public Sub RemoveAt ( _
    index As Integer _
)
public:
virtual void RemoveAt(
    int index
) sealed
Parameters
index (Int32)
The zero-based index of the item to remove.
Exceptions
Exception | Condition
ArgumentOutOfRangeException | index is not a valid index in the IList<(Of <(<'T>)>)>.
NotSupportedException | The IList<(Of <(<'T>)>)> is read-only.


Type Property

Type Property
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Type
Gets the node type for this JToken.
Declaration Syntax
C# Visual Basic Visual C++
public override JTokenType Type { get; }
Public Overrides ReadOnly Property Type As JTokenType
    Get
public:
virtual property JTokenType Type {
    JTokenType get () override;
}
Value
The type.


WriteTo Method (writer, converters)

WriteTo Method (writer, converters)
Namespaces ► Newtonsoft.Json.Linq ► JArray ► WriteTo(JsonWriter, array<JsonConverter>[]()[][])
Writes this token to a JsonWriter.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteTo(
    JsonWriter writer,
    params JsonConverter[] converters
)
Public Overrides Sub WriteTo ( _
    writer As JsonWriter, _
    ParamArray converters As JsonConverter() _
)
public:
virtual void WriteTo(
    JsonWriter^ writer,
    ... array<JsonConverter^>^ converters
) override
Parameters
writer (JsonWriter)
A JsonWriter into which this method will write.
converters (array< JsonConverter >[]()[][])
A collection of JsonConverter which will be used when writing the token.


JConstructor Class

JConstructor Class
Namespaces ► Newtonsoft.Json.Linq ► JConstructor
Represents a JSON constructor.
Declaration Syntax
C# Visual Basic Visual C++
public class JConstructor : JContainer
Public Class JConstructor _
    Inherits JContainer
public ref class JConstructor : public JContainer
Members
All Members | Constructors | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JConstructor()()()() | Initializes a new instance of the JConstructor class.
 | JConstructor(JConstructor) | Initializes a new instance of the JConstructor class from another JConstructor object.
 | JConstructor(String, array<Object>[]()[][]) | Initializes a new instance of the JConstructor class with the specified name and content.
 | JConstructor(String, Object) | Initializes a new instance of the JConstructor class with the specified name and content.
 | JConstructor(String) | Initializes a new instance of the JConstructor class with the specified name.
 | Add(Object) | Adds the specified content as children of this JToken. (Inherited from JContainer.)
 | AddAfterSelf(Object) | Adds the specified content immediately after this token. (Inherited from JToken.)
 | AddBeforeSelf(Object) | Adds the specified content immediately before this token. (Inherited from JToken.)
 | AddFirst(Object) | Adds the specified content as the first children of this JToken. (Inherited from JContainer.)
 | AddingNew | Occurs before an item is added to the collection. (Inherited from JContainer.)
 | AfterSelf()()()() | Returns a collection of the sibling tokens after this token, in document order. (Inherited from JToken.)
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token. (Inherited from JToken.)
 | BeforeSelf()()()() | Returns a collection of the sibling tokens before this token, in document order. (Inherited from JToken.)
 | Children()()()() | Returns a collection of the child tokens of this token, in document order. (Inherited from JContainer.)
 | CollectionChanged | Occurs when the items list of the collection has changed, or the collection is reset. (Inherited from JContainer.)
 | CreateReader()()()() | Creates an JsonReader for this token. (Inherited from JToken.)
 | CreateWriter()()()() | Creates an JsonWriter that can be used to add tokens to the JToken. (Inherited from JContainer.)
 | DeepClone()()()() | Creates a new instance of the JToken. All child tokens are recursively cloned. (Inherited from JToken.)
 | Descendants()()()() | Returns a collection of the descendant tokens for this token in document order. (Inherited from JContainer.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | First | Get the first child token of this token. (Inherited from JContainer.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetMetaObject(Expression) | Returns the DynamicMetaObject responsible for binding operations performed on this object. (Inherited from JToken.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HasValues | Gets a value indicating whether this token has childen tokens. (Inherited from JContainer.)
 | IsValid(JToken, JsonSchema) | Determines whether the JToken is valid. (Inherited from Extensions.)
 | Item[([( Object])]) | Gets the JToken with the specified key. (Overrides JToken.Item[([( Object])]) .)
 | Last | Get the last child token of this token. (Inherited from JContainer.)
 | ListChanged | Occurs when the list changes or an item in the list changes. (Inherited from JContainer.)
 | Load(JsonReader) | Loads an JConstructor from a JsonReader.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Name | Gets or sets the name of this constructor.
 | Next | Gets the next sibling token of this node. (Inherited from JToken.)
 | OnAddingNew(AddingNewEventArgs) | Raises the AddingNew event. (Inherited from JContainer.)
 | OnCollectionChanged(NotifyCollectionChangedEventArgs) | Raises the CollectionChanged event. (Inherited from JContainer.)
 | OnListChanged(ListChangedEventArgs) | Raises the ListChanged event. (Inherited from JContainer.)
 | Parent | Gets or sets the parent. (Inherited from JToken.)
 | Previous | Gets the previous sibling token of this node. (Inherited from JToken.)
 | Remove()()()() | Removes this token from its parent. (Inherited from JToken.)
 | RemoveAll()()()() | Removes the child nodes from this token. (Inherited from JContainer.)
 | Replace(JToken) | Replaces this token with the specified token. (Inherited from JToken.)
 | ReplaceAll(Object) | Replaces the children nodes of this token with the specified content. (Inherited from JContainer.)
 | Root | Gets the root JToken of this JToken. (Inherited from JToken.)
 | SelectToken(String) | Selects the token that matches the object path. (Inherited from JToken.)
 | SelectToken(String, Boolean) | Selects the token that matches the object path. (Inherited from JToken.)
 | ToString()()()() | Returns the indented JSON for this token. (Inherited from JToken.)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters. (Inherited from JToken.)
 | Type | Gets the node type for this JToken. (Overrides JToken.Type.)
 | Validate(JToken, JsonSchema) | Validates the specified JToken. (Inherited from Extensions.)
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken. (Inherited from Extensions.)
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type. (Inherited from JToken.)
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order. (Inherited from JContainer.)
 | WriteTo(JsonWriter, array<JsonConverter>[]()[][]) | Writes this token to a JsonWriter. (Overrides JToken.WriteTo(JsonWriter, array<JsonConverter>[]()[][]).)
Inheritance Hierarchy
Object
 | JToken
 |  | JContainer
 |  |  | JConstructor


JConstructor Constructor

JConstructor Constructor
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► JConstructor()()()()
Members
Icon | Member | Description
 | JConstructor()()()() | Initializes a new instance of the JConstructor class.
 | JConstructor(JConstructor) | Initializes a new instance of the JConstructor class from another JConstructor object.
 | JConstructor(String, array<Object>[]()[][]) | Initializes a new instance of the JConstructor class with the specified name and content.
 | JConstructor(String, Object) | Initializes a new instance of the JConstructor class with the specified name and content.
 | JConstructor(String) | Initializes a new instance of the JConstructor class with the specified name.


JConstructor Constructor

JConstructor Constructor
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► JConstructor()()()()
Initializes a new instance of the JConstructor class.
Declaration Syntax
C# Visual Basic Visual C++
public JConstructor()
Public Sub New
public:
JConstructor()


JConstructor Constructor (other)

JConstructor Constructor (other)
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► JConstructor(JConstructor)
Initializes a new instance of the JConstructor class from another JConstructor object.
Declaration Syntax
C# Visual Basic Visual C++
public JConstructor(
    JConstructor other
)
Public Sub New ( _
    other As JConstructor _
)
public:
JConstructor(
    JConstructor^ other
)
Parameters
other (JConstructor)
A JConstructor object to copy from.


JConstructor Constructor (name)

JConstructor Constructor (name)
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► JConstructor(String)
Initializes a new instance of the JConstructor class with the specified name.
Declaration Syntax
C# Visual Basic Visual C++
public JConstructor(
    string name
)
Public Sub New ( _
    name As String _
)
public:
JConstructor(
    String^ name
)
Parameters
name (String)
The constructor name.


JConstructor Constructor (name, content)

JConstructor Constructor (name, content)
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► JConstructor(String, Object)
Initializes a new instance of the JConstructor class with the specified name and content.
Declaration Syntax
C# Visual Basic Visual C++
public JConstructor(
    string name,
    Object content
)
Public Sub New ( _
    name As String, _
    content As Object _
)
public:
JConstructor(
    String^ name,
    Object^ content
)
Parameters
name (String)
The constructor name.
content (Object)
The contents of the constructor.


JConstructor Constructor (name, content)

JConstructor Constructor (name, content)
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► JConstructor(String, array<Object>[]()[][])
Initializes a new instance of the JConstructor class with the specified name and content.
Declaration Syntax
C# Visual Basic Visual C++
public JConstructor(
    string name,
    params Object[] content
)
Public Sub New ( _
    name As String, _
    ParamArray content As Object() _
)
public:
JConstructor(
    String^ name,
    ... array<Object^>^ content
)
Parameters
name (String)
The constructor name.
content (array< Object >[]()[][])
The contents of the constructor.


Item Property (key)

Item Property (key)
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► Item[([( Object])])
Gets the JToken with the specified key.
Declaration Syntax
C# Visual Basic Visual C++
public override JToken this[
    Object key
] { get; set; }
Public Overrides Default Property Item ( _
    key As Object _
) As JToken
    Get
    Set
public:
virtual property JToken^ default[Object^ key] {
    JToken^ get (Object^ key) override;
    void set (Object^ key, JToken^ value) override;
}
Parameters
key (Object)
Value
The JToken with the specified key.


Load Method (reader)

Load Method (reader)
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► Load(JsonReader)
Loads an JConstructor from a JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public static JConstructor Load(
    JsonReader reader
)
Public Shared Function Load ( _
    reader As JsonReader _
) As JConstructor
public:
static JConstructor^ Load(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
A JsonReader that will be read for the content of the JConstructor.
Return Value
A JConstructor that contains the JSON that was read from the specified JsonReader.


Name Property

Name Property
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► Name
Gets or sets the name of this constructor.
Declaration Syntax
C# Visual Basic Visual C++
public string Name { get; set; }
Public Property Name As String
    Get
    Set
public:
property String^ Name {
    String^ get ();
    void set (String^ value);
}
Value
The constructor name.


Type Property

Type Property
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► Type
Gets the node type for this JToken.
Declaration Syntax
C# Visual Basic Visual C++
public override JTokenType Type { get; }
Public Overrides ReadOnly Property Type As JTokenType
    Get
public:
virtual property JTokenType Type {
    JTokenType get () override;
}
Value
The type.


WriteTo Method (writer, converters)

WriteTo Method (writer, converters)
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► WriteTo(JsonWriter, array<JsonConverter>[]()[][])
Writes this token to a JsonWriter.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteTo(
    JsonWriter writer,
    params JsonConverter[] converters
)
Public Overrides Sub WriteTo ( _
    writer As JsonWriter, _
    ParamArray converters As JsonConverter() _
)
public:
virtual void WriteTo(
    JsonWriter^ writer,
    ... array<JsonConverter^>^ converters
) override
Parameters
writer (JsonWriter)
A JsonWriter into which this method will write.
converters (array< JsonConverter >[]()[][])
A collection of JsonConverter which will be used when writing the token.


JContainer Class

JContainer Class
Namespaces ► Newtonsoft.Json.Linq ► JContainer
Represents a token that can contain other tokens.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class JContainer : JToken,
    IList<JToken>, ICollection<JToken>, IEnumerable<JToken>,
    ITypedList, IBindingList, IList, ICollection, IEnumerable,
    INotifyCollectionChanged
Public MustInherit Class JContainer _
    Inherits JToken _
    Implements IList(Of JToken), ICollection(Of JToken),  _
    IEnumerable(Of JToken), ITypedList, IBindingList, IList,  _
    ICollection, IEnumerable, INotifyCollectionChanged
public ref class JContainer abstract : public JToken,
    IList<JToken^>, ICollection<JToken^>, IEnumerable<JToken^>,
    ITypedList, IBindingList, IList, ICollection, IEnumerable,
    INotifyCollectionChanged
Members
All Members | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | Add(Object) | Adds the specified content as children of this JToken.
 | AddAfterSelf(Object) | Adds the specified content immediately after this token. (Inherited from JToken.)
 | AddBeforeSelf(Object) | Adds the specified content immediately before this token. (Inherited from JToken.)
 | AddFirst(Object) | Adds the specified content as the first children of this JToken.
 | AddingNew | Occurs before an item is added to the collection.
 | AfterSelf()()()() | Returns a collection of the sibling tokens after this token, in document order. (Inherited from JToken.)
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token. (Inherited from JToken.)
 | Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the ancestors of every token in the source collection. (Inherited from Extensions.)
 | AsJEnumerable(IEnumerable<(Of <<'(JToken>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>. (Inherited from Extensions.)
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>. (Inherited from Extensions.)
 | BeforeSelf()()()() | Returns a collection of the sibling tokens before this token, in document order. (Inherited from JToken.)
 | Children()()()() | Returns a collection of the child tokens of this token, in document order. (Overrides JToken.Children()()()().)
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection. (Inherited from Extensions.)
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection. (Inherited from Extensions.)
 | CollectionChanged | Occurs when the items list of the collection has changed, or the collection is reset.
 | CreateReader()()()() | Creates an JsonReader for this token. (Inherited from JToken.)
 | CreateWriter()()()() | Creates an JsonWriter that can be used to add tokens to the JToken.
 | DeepClone()()()() | Creates a new instance of the JToken. All child tokens are recursively cloned. (Inherited from JToken.)
 | Descendants()()()() | Returns a collection of the descendant tokens for this token in document order.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | First | Get the first child token of this token. (Overrides JToken.First.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetMetaObject(Expression) | Returns the DynamicMetaObject responsible for binding operations performed on this object. (Inherited from JToken.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HasValues | Gets a value indicating whether this token has childen tokens. (Overrides JToken.HasValues.)
 | IsValid(JToken, JsonSchema) | Determines whether the JToken is valid. (Inherited from Extensions.)
 | Item[([( Object])]) | Gets the JToken with the specified key. (Inherited from JToken.)
 | Last | Get the last child token of this token. (Overrides JToken.Last.)
 | ListChanged | Occurs when the list changes or an item in the list changes.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Next | Gets the next sibling token of this node. (Inherited from JToken.)
 | OnAddingNew(AddingNewEventArgs) | Raises the AddingNew event.
 | OnCollectionChanged(NotifyCollectionChangedEventArgs) | Raises the CollectionChanged event.
 | OnListChanged(ListChangedEventArgs) | Raises the ListChanged event.
 | Parent | Gets or sets the parent. (Inherited from JToken.)
 | Previous | Gets the previous sibling token of this node. (Inherited from JToken.)
 | Remove()()()() | Removes this token from its parent. (Inherited from JToken.)
 | RemoveAll()()()() | Removes the child nodes from this token.
 | Replace(JToken) | Replaces this token with the specified token. (Inherited from JToken.)
 | ReplaceAll(Object) | Replaces the children nodes of this token with the specified content.
 | Root | Gets the root JToken of this JToken. (Inherited from JToken.)
 | SelectToken(String) | Selects the token that matches the object path. (Inherited from JToken.)
 | SelectToken(String, Boolean) | Selects the token that matches the object path. (Inherited from JToken.)
 | ToString()()()() | Returns the indented JSON for this token. (Inherited from JToken.)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters. (Inherited from JToken.)
 | Type | Gets the node type for this JToken. (Inherited from JToken.)
 | Validate(JToken, JsonSchema) | Validates the specified JToken. (Inherited from Extensions.)
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken. (Inherited from Extensions.)
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type. (Inherited from JToken.)
 | Value<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Converts the value. (Inherited from Extensions.)
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value. (Inherited from Extensions.)
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order. (Overrides JToken.Values<(Of <<'(T>)>>)()()()().)
 | Values(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of child values of every object in the source collection with the given key. (Inherited from Extensions.)
 | Values(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of child values of every object in the source collection. (Inherited from Extensions.)
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of converted child values of every object in the source collection with the given key. (Inherited from Extensions.)
 | WriteTo(JsonWriter, array<JsonConverter>[]()[][]) | Writes this token to a JsonWriter. (Inherited from JToken.)
Inheritance Hierarchy
Object
 | JToken
 |  | JContainer
 |  |  | JArray
 |  |  | JConstructor
 |  |  | JObject
 |  |  | JProperty


Add Method (content)

Add Method (content)
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Add(Object)
Adds the specified content as children of this JToken.
Declaration Syntax
C# Visual Basic Visual C++
public void Add(
    Object content
)
Public Sub Add ( _
    content As Object _
)
public:
void Add(
    Object^ content
)
Parameters
content (Object)
The content to be added.


AddFirst Method (content)

AddFirst Method (content)
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► AddFirst(Object)
Adds the specified content as the first children of this JToken.
Declaration Syntax
C# Visual Basic Visual C++
public void AddFirst(
    Object content
)
Public Sub AddFirst ( _
    content As Object _
)
public:
void AddFirst(
    Object^ content
)
Parameters
content (Object)
The content to be added.


AddingNew Event

AddingNew Event
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► AddingNew
Occurs before an item is added to the collection.
Declaration Syntax
C# Visual Basic Visual C++
public event AddingNewEventHandler AddingNew
Public Event AddingNew As AddingNewEventHandler
public:
 event AddingNewEventHandler^ AddingNew {
    void add (AddingNewEventHandler^ value);
    void remove (AddingNewEventHandler^ value);
}


Children Method

Children Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Children()()()()
Returns a collection of the child tokens of this token, in document order.
Declaration Syntax
C# Visual Basic Visual C++
public override JEnumerable<JToken> Children()
Public Overrides Function Children As JEnumerable(Of JToken)
public:
virtual JEnumerable<JToken^> Children() override
Return Value
An IEnumerable<(Of <(<'T>)>)> of JToken containing the child tokens of this JToken, in document order.


CollectionChanged Event

CollectionChanged Event
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► CollectionChanged
Occurs when the items list of the collection has changed, or the collection is reset.
Declaration Syntax
C# Visual Basic Visual C++
public event NotifyCollectionChangedEventHandler CollectionChanged
Public Event CollectionChanged As NotifyCollectionChangedEventHandler
public:
virtual  event NotifyCollectionChangedEventHandler^ CollectionChanged {
    void add (NotifyCollectionChangedEventHandler^ value);
    void remove (NotifyCollectionChangedEventHandler^ value);
}


CreateWriter Method

CreateWriter Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► CreateWriter()()()()
Creates an JsonWriter that can be used to add tokens to the JToken.
Declaration Syntax
C# Visual Basic Visual C++
public JsonWriter CreateWriter()
Public Function CreateWriter As JsonWriter
public:
JsonWriter^ CreateWriter()
Return Value
An JsonWriter that is ready to have content written to it.


Descendants Method

Descendants Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Descendants()()()()
Returns a collection of the descendant tokens for this token in document order.
Declaration Syntax
C# Visual Basic Visual C++
public IEnumerable<JToken> Descendants()
Public Function Descendants As IEnumerable(Of JToken)
public:
IEnumerable<JToken^>^ Descendants()
Return Value
An IEnumerable<(Of <(<'T>)>)> containing the descendant tokens of the JToken.


First Property

First Property
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► First
Get the first child token of this token.
Declaration Syntax
C# Visual Basic Visual C++
public override JToken First { get; }
Public Overrides ReadOnly Property First As JToken
    Get
public:
virtual property JToken^ First {
    JToken^ get () override;
}
Value
A JToken containing the first child token of the JToken.


HasValues Property

HasValues Property
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► HasValues
Gets a value indicating whether this token has childen tokens.
Declaration Syntax
C# Visual Basic Visual C++
public override bool HasValues { get; }
Public Overrides ReadOnly Property HasValues As Boolean
    Get
public:
virtual property bool HasValues {
    bool get () override;
}
Value
true if this token has child values; otherwise, false.


Last Property

Last Property
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Last
Get the last child token of this token.
Declaration Syntax
C# Visual Basic Visual C++
public override JToken Last { get; }
Public Overrides ReadOnly Property Last As JToken
    Get
public:
virtual property JToken^ Last {
    JToken^ get () override;
}
Value
A JToken containing the last child token of the JToken.


ListChanged Event

ListChanged Event
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► ListChanged
Occurs when the list changes or an item in the list changes.
Declaration Syntax
C# Visual Basic Visual C++
public event ListChangedEventHandler ListChanged
Public Event ListChanged As ListChangedEventHandler
public:
virtual  event ListChangedEventHandler^ ListChanged {
    void add (ListChangedEventHandler^ value);
    void remove (ListChangedEventHandler^ value);
}


OnAddingNew Method (e)

OnAddingNew Method (e)
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► OnAddingNew(AddingNewEventArgs)
Raises the AddingNew event.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void OnAddingNew(
    AddingNewEventArgs e
)
Protected Overridable Sub OnAddingNew ( _
    e As AddingNewEventArgs _
)
protected:
virtual void OnAddingNew(
    AddingNewEventArgs^ e
)
Parameters
e (AddingNewEventArgs)
The AddingNewEventArgs instance containing the event data.


OnCollectionChanged Method (e)

OnCollectionChanged Method (e)
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► OnCollectionChanged(NotifyCollectionChangedEventArgs)
Raises the CollectionChanged event.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void OnCollectionChanged(
    NotifyCollectionChangedEventArgs e
)
Protected Overridable Sub OnCollectionChanged ( _
    e As NotifyCollectionChangedEventArgs _
)
protected:
virtual void OnCollectionChanged(
    NotifyCollectionChangedEventArgs^ e
)
Parameters
e (NotifyCollectionChangedEventArgs)
The NotifyCollectionChangedEventArgs instance containing the event data.


OnListChanged Method (e)

OnListChanged Method (e)
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► OnListChanged(ListChangedEventArgs)
Raises the ListChanged event.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void OnListChanged(
    ListChangedEventArgs e
)
Protected Overridable Sub OnListChanged ( _
    e As ListChangedEventArgs _
)
protected:
virtual void OnListChanged(
    ListChangedEventArgs^ e
)
Parameters
e (ListChangedEventArgs)
The ListChangedEventArgs instance containing the event data.


RemoveAll Method

RemoveAll Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► RemoveAll()()()()
Removes the child nodes from this token.
Declaration Syntax
C# Visual Basic Visual C++
public void RemoveAll()
Public Sub RemoveAll
public:
void RemoveAll()


ReplaceAll Method (content)

ReplaceAll Method (content)
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► ReplaceAll(Object)
Replaces the children nodes of this token with the specified content.
Declaration Syntax
C# Visual Basic Visual C++
public void ReplaceAll(
    Object content
)
Public Sub ReplaceAll ( _
    content As Object _
)
public:
void ReplaceAll(
    Object^ content
)
Parameters
content (Object)
The content.


Values Method

Values<(Of <(<'T>)>)> Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Values<(Of <<'(T>)>>)()()()()
Returns a collection of the child values of this token, in document order.
Declaration Syntax
C# Visual Basic Visual C++
public override IEnumerable<T> Values<T>()

Public Overrides Function Values(Of T) As IEnumerable(Of T)
public:
generic<typename T>
virtual IEnumerable<T>^ Values() override
Generic Template Parameters
T
The type to convert the values to.
Return Value
A IEnumerable<(Of <(<'T>)>)> containing the child values of this JToken, in document order.


JEnumerable(T) Structure

JEnumerable<(Of <(<'T>)>)> Structure
Namespaces ► Newtonsoft.Json.Linq ► JEnumerable<(Of <(<'T>)>)>
Represents a collection of JToken objects.
Declaration Syntax
C# Visual Basic Visual C++
public struct JEnumerable<T> : IJEnumerable<T>,
    IEnumerable<T>, IEnumerable
where T : JToken

Public Structure JEnumerable(Of T As JToken) _
    Implements IJEnumerable(Of T), IEnumerable(Of T),  _
    IEnumerable
generic<typename T>
where T : JToken
public value class JEnumerable : IJEnumerable<T>,
    IEnumerable<T>, IEnumerable
Generic Template Parameters
T
The type of token
Members
All Members | Constructors | Methods | Properties | Fields
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JEnumerable<(Of <(<'T>)>)>(IEnumerable<(Of <<'(T>)>>)) | Initializes a new instance of the JEnumerable<(Of <(<'T>)>)> struct.
 | Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the ancestors of every token in the source collection. (Inherited from Extensions.)
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>. (Inherited from Extensions.)
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection. (Inherited from Extensions.)
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection. (Inherited from Extensions.)
 | Empty | An empty collection of JToken objects.
 | Equals(Object) | Determines whether the specified Object is equal to this instance. (Overrides ValueType.Equals(Object).)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetEnumerator()()()() | Returns an enumerator that iterates through the collection.
 | GetHashCode()()()() | Returns a hash code for this instance. (Overrides ValueType.GetHashCode()()()().)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Item[([( Object])]) | Gets the IJEnumerable<(Of <(<'T>)>)> with the specified key.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns the fully qualified type name of this instance. (Inherited from ValueType.)
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value. (Inherited from Extensions.)


JEnumerable(T) Constructor (enumerable)

JEnumerable<(Of <(<'T>)>)> Constructor (enumerable)
Namespaces ► Newtonsoft.Json.Linq ► JEnumerable<(Of <(<'T>)>)> ► JEnumerable<(Of <(<'T>)>)>(IEnumerable<(Of <<'(T>)>>))
Initializes a new instance of the JEnumerable<(Of <(<'T>)>)> struct.
Declaration Syntax
C# Visual Basic Visual C++
public JEnumerable(
    IEnumerable<T> enumerable
)
Public Sub New ( _
    enumerable As IEnumerable(Of T) _
)
public:
JEnumerable(
    IEnumerable<T>^ enumerable
)
Parameters
enumerable (IEnumerable <(Of <(<' T >)>)>)
The enumerable.


Empty Field

Empty Field
Namespaces ► Newtonsoft.Json.Linq ► JEnumerable<(Of <(<'T>)>)> ► Empty
An empty collection of JToken objects.
Declaration Syntax
C# Visual Basic Visual C++
public static readonly JEnumerable<T> Empty
Public Shared ReadOnly Empty As JEnumerable(Of T)
public:
static initonly JEnumerable<T> Empty


Equals Method (obj)

Equals Method (obj)
Namespaces ► Newtonsoft.Json.Linq ► JEnumerable<(Of <(<'T>)>)> ► Equals(Object)
Determines whether the specified Object is equal to this instance.
Declaration Syntax
C# Visual Basic Visual C++
public override bool Equals(
    Object obj
)
Public Overrides Function Equals ( _
    obj As Object _
) As Boolean
public:
virtual bool Equals(
    Object^ obj
) override
Parameters
obj (Object)
The Object to compare with this instance.
Return Value
true if the specified Object is equal to this instance; otherwise, false.


GetEnumerator Method

GetEnumerator Method
Namespaces ► Newtonsoft.Json.Linq ► JEnumerable<(Of <(<'T>)>)> ► GetEnumerator()()()()
Returns an enumerator that iterates through the collection.
Declaration Syntax
C# Visual Basic Visual C++
public IEnumerator<T> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of T)
public:
virtual IEnumerator<T>^ GetEnumerator() sealed
Return Value
A IEnumerator<(Of <(<'T>)>)> that can be used to iterate through the collection.


GetHashCode Method

GetHashCode Method
Namespaces ► Newtonsoft.Json.Linq ► JEnumerable<(Of <(<'T>)>)> ► GetHashCode()()()()
Returns a hash code for this instance.
Declaration Syntax
C# Visual Basic Visual C++
public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
public:
virtual int GetHashCode() override
Return Value
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.


Item Property (key)

Item Property (key)
Namespaces ► Newtonsoft.Json.Linq ► JEnumerable<(Of <(<'T>)>)> ► Item[([( Object])])
Gets the IJEnumerable<(Of <(<'T>)>)> with the specified key.
Declaration Syntax
C# Visual Basic Visual C++
public IJEnumerable<JToken> this[
    Object key
] { get; }
Public ReadOnly Default Property Item ( _
    key As Object _
) As IJEnumerable(Of JToken)
    Get
public:
virtual property IJEnumerable<JToken^>^ default[Object^ key] {
    IJEnumerable<JToken^>^ get (Object^ key) sealed;
}
Parameters
key (Object)
Value


JObject Class

JObject Class
Namespaces ► Newtonsoft.Json.Linq ► JObject
Represents a JSON object.
Declaration Syntax
C# Visual Basic Visual C++
public class JObject : JContainer, IDictionary<string, JToken>,
    ICollection<KeyValuePair<string, JToken>>, IEnumerable<KeyValuePair<string, JToken>>,
    IEnumerable, INotifyPropertyChanged, ICustomTypeDescriptor, INotifyPropertyChanging
Public Class JObject _
    Inherits JContainer _
    Implements IDictionary(Of String, JToken),  _
    ICollection(Of KeyValuePair(Of String, JToken)), IEnumerable(Of KeyValuePair(Of String, JToken)),  _
    IEnumerable, INotifyPropertyChanged, ICustomTypeDescriptor, INotifyPropertyChanging
public ref class JObject : public JContainer,
    IDictionary<String^, JToken^>, ICollection<KeyValuePair<String^, JToken^>>,
    IEnumerable<KeyValuePair<String^, JToken^>>, IEnumerable,
    INotifyPropertyChanged, ICustomTypeDescriptor, INotifyPropertyChanging
Members
All Members | Constructors | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JObject()()()() | Initializes a new instance of the JObject class.
 | JObject(JObject) | Initializes a new instance of the JObject class from another JObject object.
 | JObject(array<Object>[]()[][]) | Initializes a new instance of the JObject class with the specified content.
 | JObject(Object) | Initializes a new instance of the JObject class with the specified content.
 | Add(String, JToken) | Adds the specified property name.
 | Add(Object) | Adds the specified content as children of this JToken. (Inherited from JContainer.)
 | AddAfterSelf(Object) | Adds the specified content immediately after this token. (Inherited from JToken.)
 | AddBeforeSelf(Object) | Adds the specified content immediately before this token. (Inherited from JToken.)
 | AddFirst(Object) | Adds the specified content as the first children of this JToken. (Inherited from JContainer.)
 | AddingNew | Occurs before an item is added to the collection. (Inherited from JContainer.)
 | AfterSelf()()()() | Returns a collection of the sibling tokens after this token, in document order. (Inherited from JToken.)
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token. (Inherited from JToken.)
 | BeforeSelf()()()() | Returns a collection of the sibling tokens before this token, in document order. (Inherited from JToken.)
 | Children()()()() | Returns a collection of the child tokens of this token, in document order. (Inherited from JContainer.)
 | CollectionChanged | Occurs when the items list of the collection has changed, or the collection is reset. (Inherited from JContainer.)
 | Count | Gets the number of elements contained in the ICollection<(Of <(<'T>)>)>.
 | CreateReader()()()() | Creates an JsonReader for this token. (Inherited from JToken.)
 | CreateWriter()()()() | Creates an JsonWriter that can be used to add tokens to the JToken. (Inherited from JContainer.)
 | DeepClone()()()() | Creates a new instance of the JToken. All child tokens are recursively cloned. (Inherited from JToken.)
 | Descendants()()()() | Returns a collection of the descendant tokens for this token in document order. (Inherited from JContainer.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | First | Get the first child token of this token. (Inherited from JContainer.)
 | FromObject(Object) | Creates a JObject from an object.
 | FromObject(Object, JsonSerializer) | Creates a JArray from an object.
 | GetEnumerator()()()() | Returns an enumerator that iterates through the collection.
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetMetaObject(Expression) | Returns the DynamicMetaObject responsible for binding operations performed on this object. (Overrides JToken.GetMetaObject(Expression).)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HasValues | Gets a value indicating whether this token has childen tokens. (Inherited from JContainer.)
 | IsValid(JToken, JsonSchema) | Determines whether the JToken is valid. (Inherited from Extensions.)
 | Item[([( Object])]) | Gets the JToken with the specified key. (Overrides JToken.Item[([( Object])]) .)
 | Item[([( String])]) | Gets or sets the JToken with the specified property name.
 | Last | Get the last child token of this token. (Inherited from JContainer.)
 | ListChanged | Occurs when the list changes or an item in the list changes. (Inherited from JContainer.)
 | Load(JsonReader) | Loads an JObject from a JsonReader.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Next | Gets the next sibling token of this node. (Inherited from JToken.)
 | OnAddingNew(AddingNewEventArgs) | Raises the AddingNew event. (Inherited from JContainer.)
 | OnCollectionChanged(NotifyCollectionChangedEventArgs) | Raises the CollectionChanged event. (Inherited from JContainer.)
 | OnListChanged(ListChangedEventArgs) | Raises the ListChanged event. (Inherited from JContainer.)
 | OnPropertyChanged(String) | Raises the PropertyChanged event with the provided arguments.
 | OnPropertyChanging(String) | Raises the PropertyChanging event with the provided arguments.
 | Parent | Gets or sets the parent. (Inherited from JToken.)
 | Parse(String) | Load a JObject from a string that contains JSON.
 | Previous | Gets the previous sibling token of this node. (Inherited from JToken.)
 | Properties()()()() | Gets an IEnumerable<(Of <(<'T>)>)> of this object's properties.
 | Property(String) | Gets a JProperty the specified name.
 | PropertyChanged | Occurs when a property value changes.
 | PropertyChanging | Occurs when a property value is changing.
 | PropertyValues()()()() | Gets an JEnumerable<(Of <(<'T>)>)> of this object's property values.
 | Remove(String) | Removes the property with the specified name.
 | Remove()()()() | Removes this token from its parent. (Inherited from JToken.)
 | RemoveAll()()()() | Removes the child nodes from this token. (Inherited from JContainer.)
 | Replace(JToken) | Replaces this token with the specified token. (Inherited from JToken.)
 | ReplaceAll(Object) | Replaces the children nodes of this token with the specified content. (Inherited from JContainer.)
 | Root | Gets the root JToken of this JToken. (Inherited from JToken.)
 | SelectToken(String) | Selects the token that matches the object path. (Inherited from JToken.)
 | SelectToken(String, Boolean) | Selects the token that matches the object path. (Inherited from JToken.)
 | ToString()()()() | Returns the indented JSON for this token. (Inherited from JToken.)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters. (Inherited from JToken.)
 | TryGetValue(String, JToken%) | Tries the get value.
 | Type | Gets the node type for this JToken. (Overrides JToken.Type.)
 | Validate(JToken, JsonSchema) | Validates the specified JToken. (Inherited from Extensions.)
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken. (Inherited from Extensions.)
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type. (Inherited from JToken.)
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order. (Inherited from JContainer.)
 | WriteTo(JsonWriter, array<JsonConverter>[]()[][]) | Writes this token to a JsonWriter. (Overrides JToken.WriteTo(JsonWriter, array<JsonConverter>[]()[][]).)
Inheritance Hierarchy
Object
 | JToken
 |  | JContainer
 |  |  | JObject


JObject Constructor

JObject Constructor
Namespaces ► Newtonsoft.Json.Linq ► JObject ► JObject()()()()
Members
Icon | Member | Description
 | JObject()()()() | Initializes a new instance of the JObject class.
 | JObject(JObject) | Initializes a new instance of the JObject class from another JObject object.
 | JObject(array<Object>[]()[][]) | Initializes a new instance of the JObject class with the specified content.
 | JObject(Object) | Initializes a new instance of the JObject class with the specified content.


JObject Constructor

JObject Constructor
Namespaces ► Newtonsoft.Json.Linq ► JObject ► JObject()()()()
Initializes a new instance of the JObject class.
Declaration Syntax
C# Visual Basic Visual C++
public JObject()
Public Sub New
public:
JObject()


JObject Constructor (other)

JObject Constructor (other)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► JObject(JObject)
Initializes a new instance of the JObject class from another JObject object.
Declaration Syntax
C# Visual Basic Visual C++
public JObject(
    JObject other
)
Public Sub New ( _
    other As JObject _
)
public:
JObject(
    JObject^ other
)
Parameters
other (JObject)
A JObject object to copy from.


JObject Constructor (content)

JObject Constructor (content)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► JObject(Object)
Initializes a new instance of the JObject class with the specified content.
Declaration Syntax
C# Visual Basic Visual C++
public JObject(
    Object content
)
Public Sub New ( _
    content As Object _
)
public:
JObject(
    Object^ content
)
Parameters
content (Object)
The contents of the object.


JObject Constructor (content)

JObject Constructor (content)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► JObject(array<Object>[]()[][])
Initializes a new instance of the JObject class with the specified content.
Declaration Syntax
C# Visual Basic Visual C++
public JObject(
    params Object[] content
)
Public Sub New ( _
    ParamArray content As Object() _
)
public:
JObject(
    ... array<Object^>^ content
)
Parameters
content (array< Object >[]()[][])
The contents of the object.


Add Method (propertyName, value)

Add Method (propertyName, value)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Add(String, JToken)
Adds the specified property name.
Declaration Syntax
C# Visual Basic Visual C++
public void Add(
    string propertyName,
    JToken value
)
Public Sub Add ( _
    propertyName As String, _
    value As JToken _
)
public:
virtual void Add(
    String^ propertyName,
    JToken^ value
) sealed
Parameters
propertyName (String)
Name of the property.
value (JToken)
The value.


Count Property

Count Property
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Count
Gets the number of elements contained in the ICollection<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public int Count { get; }
Public ReadOnly Property Count As Integer
    Get
public:
virtual property int Count {
    int get () sealed;
}
Value
Return Value
The number of elements contained in the ICollection<(Of <(<'T>)>)>.


FromObject Method

FromObject Method
Namespaces ► Newtonsoft.Json.Linq ► JObject ► FromObject()()()()
Members
Icon | Member | Description
 | FromObject(Object) | Creates a JObject from an object.
 | FromObject(Object, JsonSerializer) | Creates a JArray from an object.


FromObject Method (o)

FromObject Method (o)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► FromObject(Object)
Creates a JObject from an object.
Declaration Syntax
C# Visual Basic Visual C++
public static JObject FromObject(
    Object o
)
Public Shared Function FromObject ( _
    o As Object _
) As JObject
public:
static JObject^ FromObject(
    Object^ o
)
Parameters
o (Object)
The object that will be used to create JObject.
Return Value
A JObject with the values of the specified object


FromObject Method (o, jsonSerializer)

FromObject Method (o, jsonSerializer)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► FromObject(Object, JsonSerializer)
Creates a JArray from an object.
Declaration Syntax
C# Visual Basic Visual C++
public static JObject FromObject(
    Object o,
    JsonSerializer jsonSerializer
)
Public Shared Function FromObject ( _
    o As Object, _
    jsonSerializer As JsonSerializer _
) As JObject
public:
static JObject^ FromObject(
    Object^ o,
    JsonSerializer^ jsonSerializer
)
Parameters
o (Object)
The object that will be used to create JArray.
jsonSerializer (JsonSerializer)
The JsonSerializer that will be used to read the object.
Return Value
A JArray with the values of the specified object


GetEnumerator Method

GetEnumerator Method
Namespaces ► Newtonsoft.Json.Linq ► JObject ► GetEnumerator()()()()
Returns an enumerator that iterates through the collection.
Declaration Syntax
C# Visual Basic Visual C++
public IEnumerator<KeyValuePair<string, JToken>> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of KeyValuePair(Of String, JToken))
public:
virtual IEnumerator<KeyValuePair<String^, JToken^>>^ GetEnumerator() sealed
Return Value
A IEnumerator<(Of <(<'T>)>)> that can be used to iterate through the collection.


GetMetaObject Method (parameter)

GetMetaObject Method (parameter)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► GetMetaObject(Expression)
Returns the DynamicMetaObject responsible for binding operations performed on this object.
Declaration Syntax
C# Visual Basic Visual C++
protected override DynamicMetaObject GetMetaObject(
    Expression parameter
)
Protected Overrides Function GetMetaObject ( _
    parameter As Expression _
) As DynamicMetaObject
protected:
virtual DynamicMetaObject^ GetMetaObject(
    Expression^ parameter
) override
Parameters
parameter (Expression)
The expression tree representation of the runtime value.
Return Value
The DynamicMetaObject to bind this object.


Item Property

Item Property
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Item
Members
Icon | Member | Description
 | Item[([( Object])]) | Gets the JToken with the specified key. (Overrides JToken.Item[([( Object])]) .)
 | Item[([( String])]) | Gets or sets the JToken with the specified property name.


Item Property (key)

Item Property (key)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Item[([( Object])])
Gets the JToken with the specified key.
Declaration Syntax
C# Visual Basic Visual C++
public override JToken this[
    Object key
] { get; set; }
Public Overrides Default Property Item ( _
    key As Object _
) As JToken
    Get
    Set
public:
virtual property JToken^ default[Object^ key] {
    JToken^ get (Object^ key) override;
    void set (Object^ key, JToken^ value) override;
}
Parameters
key (Object)
Value
The JToken with the specified key.


Item Property (propertyName)

Item Property (propertyName)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Item[([( String])])
Gets or sets the JToken with the specified property name.
Declaration Syntax
C# Visual Basic Visual C++
public JToken this[
    string propertyName
] { get; set; }
Public Default Property Item ( _
    propertyName As String _
) As JToken
    Get
    Set
public:
virtual property JToken^ default[String^ propertyName] {
    JToken^ get (String^ propertyName) sealed;
    void set (String^ propertyName, JToken^ value) sealed;
}
Parameters
propertyName (String)
Value


Load Method (reader)

Load Method (reader)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Load(JsonReader)
Loads an JObject from a JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public static JObject Load(
    JsonReader reader
)
Public Shared Function Load ( _
    reader As JsonReader _
) As JObject
public:
static JObject^ Load(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
A JsonReader that will be read for the content of the JObject.
Return Value
A JObject that contains the JSON that was read from the specified JsonReader.


OnPropertyChanged Method (propertyName)

OnPropertyChanged Method (propertyName)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► OnPropertyChanged(String)
Raises the PropertyChanged event with the provided arguments.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void OnPropertyChanged(
    string propertyName
)
Protected Overridable Sub OnPropertyChanged ( _
    propertyName As String _
)
protected:
virtual void OnPropertyChanged(
    String^ propertyName
)
Parameters
propertyName (String)
Name of the property.


OnPropertyChanging Method (propertyName)

OnPropertyChanging Method (propertyName)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► OnPropertyChanging(String)
Raises the PropertyChanging event with the provided arguments.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual void OnPropertyChanging(
    string propertyName
)
Protected Overridable Sub OnPropertyChanging ( _
    propertyName As String _
)
protected:
virtual void OnPropertyChanging(
    String^ propertyName
)
Parameters
propertyName (String)
Name of the property.


Parse Method (json)

Parse Method (json)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Parse(String)
Load a JObject from a string that contains JSON.
Declaration Syntax
C# Visual Basic Visual C++
public static JObject Parse(
    string json
)
Public Shared Function Parse ( _
    json As String _
) As JObject
public:
static JObject^ Parse(
    String^ json
)
Parameters
json (String)
A String that contains JSON.
Return Value
A JObject populated from the string that contains JSON.


Properties Method

Properties Method
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Properties()()()()
Gets an IEnumerable<(Of <(<'T>)>)> of this object's properties.
Declaration Syntax
C# Visual Basic Visual C++
public IEnumerable<JProperty> Properties()
Public Function Properties As IEnumerable(Of JProperty)
public:
IEnumerable<JProperty^>^ Properties()
Return Value
An IEnumerable<(Of <(<'T>)>)> of this object's properties.


Property Method (name)

Property Method (name)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Property(String)
Gets a JProperty the specified name.
Declaration Syntax
C# Visual Basic Visual C++
public JProperty Property(
    string name
)
Public Function Property ( _
    name As String _
) As JProperty
public:
JProperty^ Property(
    String^ name
)
Parameters
name (String)
The property name.
Return Value
A JProperty with the specified name or null.


PropertyChanged Event

PropertyChanged Event
Namespaces ► Newtonsoft.Json.Linq ► JObject ► PropertyChanged
Occurs when a property value changes.
Declaration Syntax
C# Visual Basic Visual C++
public event PropertyChangedEventHandler PropertyChanged
Public Event PropertyChanged As PropertyChangedEventHandler
public:
virtual  event PropertyChangedEventHandler^ PropertyChanged {
    void add (PropertyChangedEventHandler^ value);
    void remove (PropertyChangedEventHandler^ value);
}


PropertyChanging Event

PropertyChanging Event
Namespaces ► Newtonsoft.Json.Linq ► JObject ► PropertyChanging
Occurs when a property value is changing.
Declaration Syntax
C# Visual Basic Visual C++
public event PropertyChangingEventHandler PropertyChanging
Public Event PropertyChanging As PropertyChangingEventHandler
public:
virtual  event PropertyChangingEventHandler^ PropertyChanging {
    void add (PropertyChangingEventHandler^ value);
    void remove (PropertyChangingEventHandler^ value);
}


PropertyValues Method

PropertyValues Method
Namespaces ► Newtonsoft.Json.Linq ► JObject ► PropertyValues()()()()
Gets an JEnumerable<(Of <(<'T>)>)> of this object's property values.
Declaration Syntax
C# Visual Basic Visual C++
public JEnumerable<JToken> PropertyValues()
Public Function PropertyValues As JEnumerable(Of JToken)
public:
JEnumerable<JToken^> PropertyValues()
Return Value
An JEnumerable<(Of <(<'T>)>)> of this object's property values.


Remove Method (propertyName)

Remove Method (propertyName)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Remove(String)
Removes the property with the specified name.
Declaration Syntax
C# Visual Basic Visual C++
public bool Remove(
    string propertyName
)
Public Function Remove ( _
    propertyName As String _
) As Boolean
public:
virtual bool Remove(
    String^ propertyName
) sealed
Parameters
propertyName (String)
Name of the property.
Return Value
true if item was successfully removed; otherwise, false.


TryGetValue Method (propertyName, value)

TryGetValue Method (propertyName, value)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► TryGetValue(String, JToken%)
Tries the get value.
Declaration Syntax
C# Visual Basic Visual C++
public bool TryGetValue(
    string propertyName,
    out JToken value
)
Public Function TryGetValue ( _
    propertyName As String, _
    <OutAttribute> ByRef value As JToken _
) As Boolean
public:
virtual bool TryGetValue(
    String^ propertyName,
    [OutAttribute] JToken^% value
) sealed
Parameters
propertyName (String)
Name of the property.
value (JToken %)
The value.
Return Value
true if a value was successfully retrieved; otherwise, false.


Type Property

Type Property
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Type
Gets the node type for this JToken.
Declaration Syntax
C# Visual Basic Visual C++
public override JTokenType Type { get; }
Public Overrides ReadOnly Property Type As JTokenType
    Get
public:
virtual property JTokenType Type {
    JTokenType get () override;
}
Value
The type.


WriteTo Method (writer, converters)

WriteTo Method (writer, converters)
Namespaces ► Newtonsoft.Json.Linq ► JObject ► WriteTo(JsonWriter, array<JsonConverter>[]()[][])
Writes this token to a JsonWriter.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteTo(
    JsonWriter writer,
    params JsonConverter[] converters
)
Public Overrides Sub WriteTo ( _
    writer As JsonWriter, _
    ParamArray converters As JsonConverter() _
)
public:
virtual void WriteTo(
    JsonWriter^ writer,
    ... array<JsonConverter^>^ converters
) override
Parameters
writer (JsonWriter)
A JsonWriter into which this method will write.
converters (array< JsonConverter >[]()[][])
A collection of JsonConverter which will be used when writing the token.


JProperty Class

JProperty Class
Namespaces ► Newtonsoft.Json.Linq ► JProperty
Represents a JSON property.
Declaration Syntax
C# Visual Basic Visual C++
public class JProperty : JContainer
Public Class JProperty _
    Inherits JContainer
public ref class JProperty : public JContainer
Members
All Members | Constructors | Methods | Properties | Events
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JProperty(JProperty) | Initializes a new instance of the JProperty class from another JProperty object.
 | JProperty(String, array<Object>[]()[][]) | Initializes a new instance of the JProperty class.
 | JProperty(String, Object) | Initializes a new instance of the JProperty class.
 | Add(Object) | Adds the specified content as children of this JToken. (Inherited from JContainer.)
 | AddAfterSelf(Object) | Adds the specified content immediately after this token. (Inherited from JToken.)
 | AddBeforeSelf(Object) | Adds the specified content immediately before this token. (Inherited from JToken.)
 | AddFirst(Object) | Adds the specified content as the first children of this JToken. (Inherited from JContainer.)
 | AddingNew | Occurs before an item is added to the collection. (Inherited from JContainer.)
 | AfterSelf()()()() | Returns a collection of the sibling tokens after this token, in document order. (Inherited from JToken.)
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token. (Inherited from JToken.)
 | BeforeSelf()()()() | Returns a collection of the sibling tokens before this token, in document order. (Inherited from JToken.)
 | Children()()()() | Returns a collection of the child tokens of this token, in document order. (Overrides JContainer.Children()()()().)
 | CollectionChanged | Occurs when the items list of the collection has changed, or the collection is reset. (Inherited from JContainer.)
 | CreateReader()()()() | Creates an JsonReader for this token. (Inherited from JToken.)
 | CreateWriter()()()() | Creates an JsonWriter that can be used to add tokens to the JToken. (Inherited from JContainer.)
 | DeepClone()()()() | Creates a new instance of the JToken. All child tokens are recursively cloned. (Inherited from JToken.)
 | Descendants()()()() | Returns a collection of the descendant tokens for this token in document order. (Inherited from JContainer.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | First | Get the first child token of this token. (Inherited from JContainer.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetMetaObject(Expression) | Returns the DynamicMetaObject responsible for binding operations performed on this object. (Inherited from JToken.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HasValues | Gets a value indicating whether this token has childen tokens. (Inherited from JContainer.)
 | IsValid(JToken, JsonSchema) | Determines whether the JToken is valid. (Inherited from Extensions.)
 | Item[([( Object])]) | Gets the JToken with the specified key. (Inherited from JToken.)
 | Last | Get the last child token of this token. (Inherited from JContainer.)
 | ListChanged | Occurs when the list changes or an item in the list changes. (Inherited from JContainer.)
 | Load(JsonReader) | Loads an JProperty from a JsonReader.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Name | Gets the property name.
 | Next | Gets the next sibling token of this node. (Inherited from JToken.)
 | OnAddingNew(AddingNewEventArgs) | Raises the AddingNew event. (Inherited from JContainer.)
 | OnCollectionChanged(NotifyCollectionChangedEventArgs) | Raises the CollectionChanged event. (Inherited from JContainer.)
 | OnListChanged(ListChangedEventArgs) | Raises the ListChanged event. (Inherited from JContainer.)
 | Parent | Gets or sets the parent. (Inherited from JToken.)
 | Previous | Gets the previous sibling token of this node. (Inherited from JToken.)
 | Remove()()()() | Removes this token from its parent. (Inherited from JToken.)
 | RemoveAll()()()() | Removes the child nodes from this token. (Inherited from JContainer.)
 | Replace(JToken) | Replaces this token with the specified token. (Inherited from JToken.)
 | ReplaceAll(Object) | Replaces the children nodes of this token with the specified content. (Inherited from JContainer.)
 | Root | Gets the root JToken of this JToken. (Inherited from JToken.)
 | SelectToken(String) | Selects the token that matches the object path. (Inherited from JToken.)
 | SelectToken(String, Boolean) | Selects the token that matches the object path. (Inherited from JToken.)
 | ToString()()()() | Returns the indented JSON for this token. (Inherited from JToken.)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters. (Inherited from JToken.)
 | Type | Gets the node type for this JToken. (Overrides JToken.Type.)
 | Validate(JToken, JsonSchema) | Validates the specified JToken. (Inherited from Extensions.)
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken. (Inherited from Extensions.)
 | Value | Gets or sets the property value.
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type. (Inherited from JToken.)
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order. (Inherited from JContainer.)
 | WriteTo(JsonWriter, array<JsonConverter>[]()[][]) | Writes this token to a JsonWriter. (Overrides JToken.WriteTo(JsonWriter, array<JsonConverter>[]()[][]).)
Inheritance Hierarchy
Object
 | JToken
 |  | JContainer
 |  |  | JProperty


JProperty Constructor

JProperty Constructor
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► JProperty()()()()
Members
Icon | Member | Description
 | JProperty(JProperty) | Initializes a new instance of the JProperty class from another JProperty object.
 | JProperty(String, array<Object>[]()[][]) | Initializes a new instance of the JProperty class.
 | JProperty(String, Object) | Initializes a new instance of the JProperty class.


JProperty Constructor (other)

JProperty Constructor (other)
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► JProperty(JProperty)
Initializes a new instance of the JProperty class from another JProperty object.
Declaration Syntax
C# Visual Basic Visual C++
public JProperty(
    JProperty other
)
Public Sub New ( _
    other As JProperty _
)
public:
JProperty(
    JProperty^ other
)
Parameters
other (JProperty)
A JProperty object to copy from.


JProperty Constructor (name, content)

JProperty Constructor (name, content)
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► JProperty(String, Object)
Initializes a new instance of the JProperty class.
Declaration Syntax
C# Visual Basic Visual C++
public JProperty(
    string name,
    Object content
)
Public Sub New ( _
    name As String, _
    content As Object _
)
public:
JProperty(
    String^ name,
    Object^ content
)
Parameters
name (String)
The property name.
content (Object)
The property content.


JProperty Constructor (name, content)

JProperty Constructor (name, content)
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► JProperty(String, array<Object>[]()[][])
Initializes a new instance of the JProperty class.
Declaration Syntax
C# Visual Basic Visual C++
public JProperty(
    string name,
    params Object[] content
)
Public Sub New ( _
    name As String, _
    ParamArray content As Object() _
)
public:
JProperty(
    String^ name,
    ... array<Object^>^ content
)
Parameters
name (String)
The property name.
content (array< Object >[]()[][])
The property content.


Children Method

Children Method
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► Children()()()()
Returns a collection of the child tokens of this token, in document order.
Declaration Syntax
C# Visual Basic Visual C++
public override JEnumerable<JToken> Children()
Public Overrides Function Children As JEnumerable(Of JToken)
public:
virtual JEnumerable<JToken^> Children() override
Return Value
An IEnumerable<(Of <(<'T>)>)> of JToken containing the child tokens of this JToken, in document order.


Load Method (reader)

Load Method (reader)
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► Load(JsonReader)
Loads an JProperty from a JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public static JProperty Load(
    JsonReader reader
)
Public Shared Function Load ( _
    reader As JsonReader _
) As JProperty
public:
static JProperty^ Load(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
A JsonReader that will be read for the content of the JProperty.
Return Value
A JProperty that contains the JSON that was read from the specified JsonReader.


Name Property

Name Property
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► Name
Gets the property name.
Declaration Syntax
C# Visual Basic Visual C++
public string Name { get; }
Public ReadOnly Property Name As String
    Get
public:
property String^ Name {
    String^ get ();
}
Value
The property name.


Type Property

Type Property
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► Type
Gets the node type for this JToken.
Declaration Syntax
C# Visual Basic Visual C++
public override JTokenType Type { get; }
Public Overrides ReadOnly Property Type As JTokenType
    Get
public:
virtual property JTokenType Type {
    JTokenType get () override;
}
Value
The type.


Value Property

Value Property
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► Value
Gets or sets the property value.
Declaration Syntax
C# Visual Basic Visual C++
public JToken Value { get; set; }
Public Property Value As JToken
    Get
    Set
public:
property JToken^ Value {
    JToken^ get ();
    void set (JToken^ value);
}
Value
The property value.


WriteTo Method (writer, converters)

WriteTo Method (writer, converters)
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► WriteTo(JsonWriter, array<JsonConverter>[]()[][])
Writes this token to a JsonWriter.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteTo(
    JsonWriter writer,
    params JsonConverter[] converters
)
Public Overrides Sub WriteTo ( _
    writer As JsonWriter, _
    ParamArray converters As JsonConverter() _
)
public:
virtual void WriteTo(
    JsonWriter^ writer,
    ... array<JsonConverter^>^ converters
) override
Parameters
writer (JsonWriter)
A JsonWriter into which this method will write.
converters (array< JsonConverter >[]()[][])
A collection of JsonConverter which will be used when writing the token.


JRaw Class

JRaw Class
Namespaces ► Newtonsoft.Json.Linq ► JRaw
Represents a raw JSON string.
Declaration Syntax
C# Visual Basic Visual C++
public class JRaw : JValue
Public Class JRaw _
    Inherits JValue
public ref class JRaw : public JValue
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JRaw(JRaw) | Initializes a new instance of the JRaw class from another JRaw object.
 | JRaw(Object) | Initializes a new instance of the JRaw class.
 | AddAfterSelf(Object) | Adds the specified content immediately after this token. (Inherited from JToken.)
 | AddBeforeSelf(Object) | Adds the specified content immediately before this token. (Inherited from JToken.)
 | AfterSelf()()()() | Returns a collection of the sibling tokens after this token, in document order. (Inherited from JToken.)
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token. (Inherited from JToken.)
 | BeforeSelf()()()() | Returns a collection of the sibling tokens before this token, in document order. (Inherited from JToken.)
 | Children()()()() | Returns a collection of the child tokens of this token, in document order. (Inherited from JToken.)
 | CompareTo(JValue) | Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. (Inherited from JValue.)
 | Create(JsonReader) | Creates an instance of JRaw with the content of the reader's current token.
 | CreateReader()()()() | Creates an JsonReader for this token. (Inherited from JToken.)
 | DeepClone()()()() | Creates a new instance of the JToken. All child tokens are recursively cloned. (Inherited from JToken.)
 | Equals(JValue) | Indicates whether the current object is equal to another object of the same type. (Inherited from JValue.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from JValue.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | First | Get the first child token of this token. (Inherited from JToken.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from JValue.)
 | GetMetaObject(Expression) | Returns the DynamicMetaObject responsible for binding operations performed on this object. (Inherited from JValue.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HasValues | Gets a value indicating whether this token has childen tokens. (Inherited from JValue.)
 | IsValid(JToken, JsonSchema) | Determines whether the JToken is valid. (Inherited from Extensions.)
 | Item[([( Object])]) | Gets the JToken with the specified key. (Inherited from JToken.)
 | Last | Get the last child token of this token. (Inherited from JToken.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Next | Gets the next sibling token of this node. (Inherited from JToken.)
 | Parent | Gets or sets the parent. (Inherited from JToken.)
 | Previous | Gets the previous sibling token of this node. (Inherited from JToken.)
 | Remove()()()() | Removes this token from its parent. (Inherited from JToken.)
 | Replace(JToken) | Replaces this token with the specified token. (Inherited from JToken.)
 | Root | Gets the root JToken of this JToken. (Inherited from JToken.)
 | SelectToken(String) | Selects the token that matches the object path. (Inherited from JToken.)
 | SelectToken(String, Boolean) | Selects the token that matches the object path. (Inherited from JToken.)
 | ToString()()()() | Returns a String that represents this instance. (Inherited from JValue.)
 | ToString(String) | Returns a String that represents this instance. (Inherited from JValue.)
 | ToString(IFormatProvider) | Returns a String that represents this instance. (Inherited from JValue.)
 | ToString(String, IFormatProvider) | Returns a String that represents this instance. (Inherited from JValue.)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters. (Inherited from JToken.)
 | Type | Gets the node type for this JToken. (Inherited from JValue.)
 | Validate(JToken, JsonSchema) | Validates the specified JToken. (Inherited from Extensions.)
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken. (Inherited from Extensions.)
 | Value | Gets or sets the underlying token value. (Inherited from JValue.)
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type. (Inherited from JToken.)
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order. (Inherited from JToken.)
 | WriteTo(JsonWriter, array<JsonConverter>[]()[][]) | Writes this token to a JsonWriter. (Inherited from JValue.)
Inheritance Hierarchy
Object
 | JToken
 |  | JValue
 |  |  | JRaw


JRaw Constructor

JRaw Constructor
Namespaces ► Newtonsoft.Json.Linq ► JRaw ► JRaw()()()()
Members
Icon | Member | Description
 | JRaw(JRaw) | Initializes a new instance of the JRaw class from another JRaw object.
 | JRaw(Object) | Initializes a new instance of the JRaw class.


JRaw Constructor (other)

JRaw Constructor (other)
Namespaces ► Newtonsoft.Json.Linq ► JRaw ► JRaw(JRaw)
Initializes a new instance of the JRaw class from another JRaw object.
Declaration Syntax
C# Visual Basic Visual C++
public JRaw(
    JRaw other
)
Public Sub New ( _
    other As JRaw _
)
public:
JRaw(
    JRaw^ other
)
Parameters
other (JRaw)
A JRaw object to copy from.


JRaw Constructor (rawJson)

JRaw Constructor (rawJson)
Namespaces ► Newtonsoft.Json.Linq ► JRaw ► JRaw(Object)
Initializes a new instance of the JRaw class.
Declaration Syntax
C# Visual Basic Visual C++
public JRaw(
    Object rawJson
)
Public Sub New ( _
    rawJson As Object _
)
public:
JRaw(
    Object^ rawJson
)
Parameters
rawJson (Object)
The raw json.


Create Method (reader)

Create Method (reader)
Namespaces ► Newtonsoft.Json.Linq ► JRaw ► Create(JsonReader)
Creates an instance of JRaw with the content of the reader's current token.
Declaration Syntax
C# Visual Basic Visual C++
public static JRaw Create(
    JsonReader reader
)
Public Shared Function Create ( _
    reader As JsonReader _
) As JRaw
public:
static JRaw^ Create(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
The reader.
Return Value
An instance of JRaw with the content of the reader's current token.


JToken Class

JToken Class
Namespaces ► Newtonsoft.Json.Linq ► JToken
Represents an abstract JSON token.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class JToken : IJEnumerable<JToken>,
    IEnumerable<JToken>, IEnumerable, IJsonLineInfo, ICloneable,
    IDynamicMetaObjectProvider
Public MustInherit Class JToken _
    Implements IJEnumerable(Of JToken), IEnumerable(Of JToken),  _
    IEnumerable, IJsonLineInfo, ICloneable, IDynamicMetaObjectProvider
public ref class JToken abstract : IJEnumerable<JToken^>,
    IEnumerable<JToken^>, IEnumerable, IJsonLineInfo, ICloneable,
    IDynamicMetaObjectProvider
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | AddAfterSelf(Object) | Adds the specified content immediately after this token.
 | AddBeforeSelf(Object) | Adds the specified content immediately before this token.
 | AfterSelf()()()() | Returns a collection of the sibling tokens after this token, in document order.
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token.
 | Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the ancestors of every token in the source collection. (Inherited from Extensions.)
 | AsJEnumerable(IEnumerable<(Of <<'(JToken>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>. (Inherited from Extensions.)
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>. (Inherited from Extensions.)
 | BeforeSelf()()()() | Returns a collection of the sibling tokens before this token, in document order.
 | Children()()()() | Returns a collection of the child tokens of this token, in document order.
 | Children<(Of <<'(T>)>>)()()()() | Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection. (Inherited from Extensions.)
 | CreateReader()()()() | Creates an JsonReader for this token.
 | DeepClone()()()() | Creates a new instance of the JToken. All child tokens are recursively cloned.
 | DeepEquals(JToken, JToken) | Compares the values of two tokens, including the values of all descendant tokens.
 | EqualityComparer | Gets a comparer that can compare two tokens for value equality.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Boolean) | Performs an explicit conversion from JToken to Boolean.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to DateTimeOffset) | Performs an explicit conversion from JToken to DateTimeOffset.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Boolean>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Int64) | Performs an explicit conversion from JToken to Int64.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(DateTime>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(DateTimeOffset>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Decimal>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Double>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Int32) | Performs an explicit conversion from JToken to Int32.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Int16) | Performs an explicit conversion from JToken to Int16.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to UInt16) | Performs an explicit conversion from JToken to UInt16.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Int32>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Int16>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(UInt16>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to DateTime) | Performs an explicit conversion from JToken to DateTime.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Int64>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Single>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Decimal) | Performs an explicit conversion from JToken to Decimal.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(UInt32>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(UInt64>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Double) | Performs an explicit conversion from JToken to Double.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Single) | Performs an explicit conversion from JToken to Single.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to String) | Performs an explicit conversion from JToken to String.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to UInt32) | Performs an explicit conversion from JToken to UInt32.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to UInt64) | Performs an explicit conversion from JToken to UInt64.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to array<Byte>[]()[][]) | Performs an explicit conversion from JToken to array<Byte>[]()[][].
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | First | Get the first child token of this token.
 | FromObject(Object) | Creates a JToken from an object.
 | FromObject(Object, JsonSerializer) | Creates a JToken from an object using the specified JsonSerializer.
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetMetaObject(Expression) | Returns the DynamicMetaObject responsible for binding operations performed on this object.
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HasValues | Gets a value indicating whether this token has childen tokens.
 | ImplicitWideningImplicitImplicitImplicit(Boolean to JToken) | Performs an implicit conversion from Boolean to JToken.
 | ImplicitWideningImplicitImplicitImplicit(DateTimeOffset to JToken) | Performs an implicit conversion from DateTimeOffset to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Boolean>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Int64 to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(DateTime>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(DateTimeOffset>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Decimal>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Double>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Int16 to JToken) | Performs an implicit conversion from Int16 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(UInt16 to JToken) | Performs an implicit conversion from UInt16 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Int32 to JToken) | Performs an implicit conversion from Int32 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Int32>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(DateTime to JToken) | Performs an implicit conversion from DateTime to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Int64>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Single>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Decimal to JToken) | Performs an implicit conversion from Decimal to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Int16>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(UInt16>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(UInt32>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(UInt64>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Double to JToken) | Performs an implicit conversion from Double to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Single to JToken) | Performs an implicit conversion from Single to JToken.
 | ImplicitWideningImplicitImplicitImplicit(String to JToken) | Performs an implicit conversion from String to JToken.
 | ImplicitWideningImplicitImplicitImplicit(UInt32 to JToken) | Performs an implicit conversion from UInt32 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(UInt64 to JToken) | Performs an implicit conversion from UInt64 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(array<Byte>[]()[][] to JToken) | Performs an implicit conversion from array<Byte>[]()[][] to JToken.
 | IsValid(JToken, JsonSchema) | Determines whether the JToken is valid. (Inherited from Extensions.)
 | Item[([( Object])]) | Gets the JToken with the specified key.
 | Last | Get the last child token of this token.
 | Load(JsonReader) | Creates a JToken from a JsonReader.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Next | Gets the next sibling token of this node.
 | Parent | Gets or sets the parent.
 | Parse(String) | Load a JToken from a string that contains JSON.
 | Previous | Gets the previous sibling token of this node.
 | ReadFrom(JsonReader) | Creates a JToken from a JsonReader.
 | Remove()()()() | Removes this token from its parent.
 | Replace(JToken) | Replaces this token with the specified token.
 | Root | Gets the root JToken of this JToken.
 | SelectToken(String) | Selects the token that matches the object path.
 | SelectToken(String, Boolean) | Selects the token that matches the object path.
 | ToString()()()() | Returns the indented JSON for this token. (Overrides Object.ToString()()()().)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters.
 | Type | Gets the node type for this JToken.
 | Validate(JToken, JsonSchema) | Validates the specified JToken. (Inherited from Extensions.)
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken. (Inherited from Extensions.)
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type.
 | Value<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Converts the value. (Inherited from Extensions.)
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value. (Inherited from Extensions.)
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order.
 | Values(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of child values of every object in the source collection with the given key. (Inherited from Extensions.)
 | Values(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of child values of every object in the source collection. (Inherited from Extensions.)
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of converted child values of every object in the source collection with the given key. (Inherited from Extensions.)
 | WriteTo(JsonWriter, array<JsonConverter>[]()[][]) | Writes this token to a JsonWriter.
Inheritance Hierarchy
Object
 | JToken
 |  | JContainer
 |  | JValue


AddAfterSelf Method (content)

AddAfterSelf Method (content)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► AddAfterSelf(Object)
Adds the specified content immediately after this token.
Declaration Syntax
C# Visual Basic Visual C++
public void AddAfterSelf(
    Object content
)
Public Sub AddAfterSelf ( _
    content As Object _
)
public:
void AddAfterSelf(
    Object^ content
)
Parameters
content (Object)
A content object that contains simple content or a collection of content objects to be added after this token.


AddBeforeSelf Method (content)

AddBeforeSelf Method (content)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► AddBeforeSelf(Object)
Adds the specified content immediately before this token.
Declaration Syntax
C# Visual Basic Visual C++
public void AddBeforeSelf(
    Object content
)
Public Sub AddBeforeSelf ( _
    content As Object _
)
public:
void AddBeforeSelf(
    Object^ content
)
Parameters
content (Object)
A content object that contains simple content or a collection of content objects to be added before this token.


AfterSelf Method

AfterSelf Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► AfterSelf()()()()
Returns a collection of the sibling tokens after this token, in document order.
Declaration Syntax
C# Visual Basic Visual C++
public IEnumerable<JToken> AfterSelf()
Public Function AfterSelf As IEnumerable(Of JToken)
public:
IEnumerable<JToken^>^ AfterSelf()
Return Value
A collection of the sibling tokens after this tokens, in document order.


Ancestors Method

Ancestors Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Ancestors()()()()
Returns a collection of the ancestor tokens of this token.
Declaration Syntax
C# Visual Basic Visual C++
public IEnumerable<JToken> Ancestors()
Public Function Ancestors As IEnumerable(Of JToken)
public:
IEnumerable<JToken^>^ Ancestors()
Return Value
A collection of the ancestor tokens of this token.


BeforeSelf Method

BeforeSelf Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► BeforeSelf()()()()
Returns a collection of the sibling tokens before this token, in document order.
Declaration Syntax
C# Visual Basic Visual C++
public IEnumerable<JToken> BeforeSelf()
Public Function BeforeSelf As IEnumerable(Of JToken)
public:
IEnumerable<JToken^>^ BeforeSelf()
Return Value
A collection of the sibling tokens before this token, in document order.


Children Method

Children Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Children()()()()
Members
Icon | Member | Description
 | Children()()()() | Returns a collection of the child tokens of this token, in document order.
 | Children<(Of <<'(T>)>>)()()()() | Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection.


Children Method

Children Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Children()()()()
Returns a collection of the child tokens of this token, in document order.
Declaration Syntax
C# Visual Basic Visual C++
public virtual JEnumerable<JToken> Children()
Public Overridable Function Children As JEnumerable(Of JToken)
public:
virtual JEnumerable<JToken^> Children()
Return Value
An IEnumerable<(Of <(<'T>)>)> of JToken containing the child tokens of this JToken, in document order.


Children Method

Children<(Of <(<'T>)>)> Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Children<(Of <<'(T>)>>)()()()()
Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
Declaration Syntax
C# Visual Basic Visual C++
public JEnumerable<T> Children<T>()
where T : JToken

Public Function Children(Of T As JToken) As JEnumerable(Of T)
public:
generic<typename T>
where T : JToken
JEnumerable<T> Children()
Generic Template Parameters
T
The type to filter the child tokens on.
Return Value
A JEnumerable<(Of <(<'T>)>)> containing the child tokens of this JToken, in document order.


CreateReader Method

CreateReader Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► CreateReader()()()()
Creates an JsonReader for this token.
Declaration Syntax
C# Visual Basic Visual C++
public JsonReader CreateReader()
Public Function CreateReader As JsonReader
public:
JsonReader^ CreateReader()
Return Value
An JsonReader that can be used to read this token and its descendants.


DeepClone Method

DeepClone Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► DeepClone()()()()
Creates a new instance of the JToken. All child tokens are recursively cloned.
Declaration Syntax
C# Visual Basic Visual C++
public JToken DeepClone()
Public Function DeepClone As JToken
public:
JToken^ DeepClone()
Return Value
A new instance of the JToken.


DeepEquals Method (t1, t2)

DeepEquals Method (t1, t2)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► DeepEquals(JToken, JToken)
Compares the values of two tokens, including the values of all descendant tokens.
Declaration Syntax
C# Visual Basic Visual C++
public static bool DeepEquals(
    JToken t1,
    JToken t2
)
Public Shared Function DeepEquals ( _
    t1 As JToken, _
    t2 As JToken _
) As Boolean
public:
static bool DeepEquals(
    JToken^ t1,
    JToken^ t2
)
Parameters
t1 (JToken)
The first JToken to compare.
t2 (JToken)
The second JToken to compare.
Return Value
true if the tokens are equal; otherwise false.


EqualityComparer Property

EqualityComparer Property
Namespaces ► Newtonsoft.Json.Linq ► JToken ► EqualityComparer
Gets a comparer that can compare two tokens for value equality.
Declaration Syntax
C# Visual Basic Visual C++
public static JTokenEqualityComparer EqualityComparer { get; }
Public Shared ReadOnly Property EqualityComparer As JTokenEqualityComparer
    Get
public:
static property JTokenEqualityComparer^ EqualityComparer {
    JTokenEqualityComparer^ get ();
}
Value
A JTokenEqualityComparer that can compare two nodes for value equality.


Explicit Method

Explicit Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Explicit()()()()
Members
Icon | Member | Description
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Boolean) | Performs an explicit conversion from JToken to Boolean.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to DateTimeOffset) | Performs an explicit conversion from JToken to DateTimeOffset.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Boolean>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Int64) | Performs an explicit conversion from JToken to Int64.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(DateTime>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(DateTimeOffset>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Decimal>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Double>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Int32) | Performs an explicit conversion from JToken to Int32.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Int16) | Performs an explicit conversion from JToken to Int16.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to UInt16) | Performs an explicit conversion from JToken to UInt16.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Int32>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Int16>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(UInt16>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to DateTime) | Performs an explicit conversion from JToken to DateTime.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Int64>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Single>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Decimal) | Performs an explicit conversion from JToken to Decimal.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(UInt32>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(UInt64>)>>)) | Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Double) | Performs an explicit conversion from JToken to Double.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to Single) | Performs an explicit conversion from JToken to Single.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to String) | Performs an explicit conversion from JToken to String.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to UInt32) | Performs an explicit conversion from JToken to UInt32.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to UInt64) | Performs an explicit conversion from JToken to UInt64.
 | ExplicitNarrowingExplicitExplicitExplicit(JToken to array<Byte>[]()[][]) | Performs an explicit conversion from JToken to array<Byte>[]()[][].


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Decimal)
Performs an explicit conversion from JToken to Decimal.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator decimal (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Decimal
static explicit operator Decimal (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(UInt32>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<uint> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of UInteger)
static explicit operator Nullable<unsigned int> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(UInt64>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<ulong> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of ULong)
static explicit operator Nullable<unsigned long long> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to DateTime)
Performs an explicit conversion from JToken to DateTime.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator DateTime (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As DateTime
static explicit operator DateTime (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Int64>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<long> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of Long)
static explicit operator Nullable<long long> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Single>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<float> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of Single)
static explicit operator Nullable<float> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to UInt32)
Performs an explicit conversion from JToken to UInt32.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator uint (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As UInteger
static explicit operator unsigned int (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to UInt64)
Performs an explicit conversion from JToken to UInt64.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator ulong (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As ULong
static explicit operator unsigned long long (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to array<Byte>[]()[][])
Performs an explicit conversion from JToken to array<Byte>[]()[][].
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator byte[] (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Byte()
static explicit operator array<unsigned char>^ (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Double)
Performs an explicit conversion from JToken to Double.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator double (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Double
static explicit operator double (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Single)
Performs an explicit conversion from JToken to Single.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator float (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Single
static explicit operator float (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to String)
Performs an explicit conversion from JToken to String.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator string (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As String
static explicit operator String^ (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(DateTime>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<DateTime> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of DateTime)
static explicit operator Nullable<DateTime> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(DateTimeOffset>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<DateTimeOffset> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of DateTimeOffset)
static explicit operator Nullable<DateTimeOffset> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Decimal>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<decimal> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of Decimal)
static explicit operator Nullable<Decimal> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Int64)
Performs an explicit conversion from JToken to Int64.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator long (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Long
static explicit operator long long (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Boolean)
Performs an explicit conversion from JToken to Boolean.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator bool (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Boolean
static explicit operator bool (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to DateTimeOffset)
Performs an explicit conversion from JToken to DateTimeOffset.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator DateTimeOffset (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As DateTimeOffset
static explicit operator DateTimeOffset (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Boolean>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<bool> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of Boolean)
static explicit operator Nullable<bool> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Int32>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<int> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of Integer)
static explicit operator Nullable<int> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Int16>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<short> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of Short)
static explicit operator Nullable<short> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(UInt16>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<ushort> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of UShort)
static explicit operator Nullable<unsigned short> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to UInt16)
Performs an explicit conversion from JToken to UInt16.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator ushort (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As UShort
static explicit operator unsigned short (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Int32)
Performs an explicit conversion from JToken to Int32.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator int (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Integer
static explicit operator int (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Nullable<(Of <<'(Double>)>>))
Performs an explicit conversion from JToken to Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator Nullable<double> (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Nullable(Of Double)
static explicit operator Nullable<double> (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


Explicit Operator

Explicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ExplicitNarrowingExplicitExplicitExplicit(JToken to Int16)
Performs an explicit conversion from JToken to Int16.
Declaration Syntax
C# Visual Basic Visual C++
public static explicit operator short (
    JToken value
)
Public Shared Narrowing Operator CType ( _
    value As JToken _
) As Short
static explicit operator short (
    JToken^ value
)
Parameters
value (JToken)
The value.
Return Value
The result of the conversion.


First Property

First Property
Namespaces ► Newtonsoft.Json.Linq ► JToken ► First
Get the first child token of this token.
Declaration Syntax
C# Visual Basic Visual C++
public virtual JToken First { get; }
Public Overridable ReadOnly Property First As JToken
    Get
public:
virtual property JToken^ First {
    JToken^ get ();
}
Value
A JToken containing the first child token of the JToken.


FromObject Method

FromObject Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► FromObject()()()()
Members
Icon | Member | Description
 | FromObject(Object) | Creates a JToken from an object.
 | FromObject(Object, JsonSerializer) | Creates a JToken from an object using the specified JsonSerializer.


FromObject Method (o)

FromObject Method (o)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► FromObject(Object)
Creates a JToken from an object.
Declaration Syntax
C# Visual Basic Visual C++
public static JToken FromObject(
    Object o
)
Public Shared Function FromObject ( _
    o As Object _
) As JToken
public:
static JToken^ FromObject(
    Object^ o
)
Parameters
o (Object)
The object that will be used to create JToken.
Return Value
A JToken with the value of the specified object


FromObject Method (o, jsonSerializer)

FromObject Method (o, jsonSerializer)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► FromObject(Object, JsonSerializer)
Creates a JToken from an object using the specified JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public static JToken FromObject(
    Object o,
    JsonSerializer jsonSerializer
)
Public Shared Function FromObject ( _
    o As Object, _
    jsonSerializer As JsonSerializer _
) As JToken
public:
static JToken^ FromObject(
    Object^ o,
    JsonSerializer^ jsonSerializer
)
Parameters
o (Object)
The object that will be used to create JToken.
jsonSerializer (JsonSerializer)
The JsonSerializer that will be used when reading the object.
Return Value
A JToken with the value of the specified object


GetMetaObject Method (parameter)

GetMetaObject Method (parameter)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► GetMetaObject(Expression)
Returns the DynamicMetaObject responsible for binding operations performed on this object.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual DynamicMetaObject GetMetaObject(
    Expression parameter
)
Protected Overridable Function GetMetaObject ( _
    parameter As Expression _
) As DynamicMetaObject
protected:
virtual DynamicMetaObject^ GetMetaObject(
    Expression^ parameter
)
Parameters
parameter (Expression)
The expression tree representation of the runtime value.
Return Value
The DynamicMetaObject to bind this object.


HasValues Property

HasValues Property
Namespaces ► Newtonsoft.Json.Linq ► JToken ► HasValues
Gets a value indicating whether this token has childen tokens.
Declaration Syntax
C# Visual Basic Visual C++
public abstract bool HasValues { get; }
Public MustOverride ReadOnly Property HasValues As Boolean
    Get
public:
virtual property bool HasValues {
    bool get () abstract;
}
Value
true if this token has child values; otherwise, false.


Implicit Method

Implicit Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Implicit()()()()
Members
Icon | Member | Description
 | ImplicitWideningImplicitImplicitImplicit(Boolean to JToken) | Performs an implicit conversion from Boolean to JToken.
 | ImplicitWideningImplicitImplicitImplicit(DateTimeOffset to JToken) | Performs an implicit conversion from DateTimeOffset to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Boolean>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Int64 to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(DateTime>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(DateTimeOffset>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Decimal>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Double>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Int16 to JToken) | Performs an implicit conversion from Int16 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(UInt16 to JToken) | Performs an implicit conversion from UInt16 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Int32 to JToken) | Performs an implicit conversion from Int32 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Int32>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(DateTime to JToken) | Performs an implicit conversion from DateTime to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Int64>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Single>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Decimal to JToken) | Performs an implicit conversion from Decimal to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Int16>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(UInt16>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(UInt32>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(UInt64>)>>) to JToken) | Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Double to JToken) | Performs an implicit conversion from Double to JToken.
 | ImplicitWideningImplicitImplicitImplicit(Single to JToken) | Performs an implicit conversion from Single to JToken.
 | ImplicitWideningImplicitImplicitImplicit(String to JToken) | Performs an implicit conversion from String to JToken.
 | ImplicitWideningImplicitImplicitImplicit(UInt32 to JToken) | Performs an implicit conversion from UInt32 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(UInt64 to JToken) | Performs an implicit conversion from UInt64 to JToken.
 | ImplicitWideningImplicitImplicitImplicit(array<Byte>[]()[][] to JToken) | Performs an implicit conversion from array<Byte>[]()[][] to JToken.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Boolean to JToken)
Performs an implicit conversion from Boolean to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    bool value
)
Public Shared Widening Operator CType ( _
    value As Boolean _
) As JToken
static implicit operator JToken^ (
    bool value
)
Parameters
value (Boolean)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(array<Byte>[]()[][] to JToken)
Performs an implicit conversion from array<Byte>[]()[][] to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    byte[] value
)
Public Shared Widening Operator CType ( _
    value As Byte() _
) As JToken
static implicit operator JToken^ (
    array<unsigned char>^ value
)
Parameters
value (array< Byte >[]()[][])
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(DateTime to JToken)
Performs an implicit conversion from DateTime to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    DateTime value
)
Public Shared Widening Operator CType ( _
    value As DateTime _
) As JToken
static implicit operator JToken^ (
    DateTime value
)
Parameters
value (DateTime)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(DateTimeOffset to JToken)
Performs an implicit conversion from DateTimeOffset to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    DateTimeOffset value
)
Public Shared Widening Operator CType ( _
    value As DateTimeOffset _
) As JToken
static implicit operator JToken^ (
    DateTimeOffset value
)
Parameters
value (DateTimeOffset)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Decimal to JToken)
Performs an implicit conversion from Decimal to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    decimal value
)
Public Shared Widening Operator CType ( _
    value As Decimal _
) As JToken
static implicit operator JToken^ (
    Decimal value
)
Parameters
value (Decimal)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Double to JToken)
Performs an implicit conversion from Double to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    double value
)
Public Shared Widening Operator CType ( _
    value As Double _
) As JToken
static implicit operator JToken^ (
    double value
)
Parameters
value (Double)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Int16 to JToken)
Performs an implicit conversion from Int16 to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    short value
)
Public Shared Widening Operator CType ( _
    value As Short _
) As JToken
static implicit operator JToken^ (
    short value
)
Parameters
value (Int16)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Int32 to JToken)
Performs an implicit conversion from Int32 to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    int value
)
Public Shared Widening Operator CType ( _
    value As Integer _
) As JToken
static implicit operator JToken^ (
    int value
)
Parameters
value (Int32)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Int64 to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    long value
)
Public Shared Widening Operator CType ( _
    value As Long _
) As JToken
static implicit operator JToken^ (
    long long value
)
Parameters
value (Int64)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Boolean>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<bool> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of Boolean) _
) As JToken
static implicit operator JToken^ (
    Nullable<bool> value
)
Parameters
value (Nullable <(Of <(<' Boolean >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(DateTime>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<DateTime> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of DateTime) _
) As JToken
static implicit operator JToken^ (
    Nullable<DateTime> value
)
Parameters
value (Nullable <(Of <(<' DateTime >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(DateTimeOffset>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<DateTimeOffset> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of DateTimeOffset) _
) As JToken
static implicit operator JToken^ (
    Nullable<DateTimeOffset> value
)
Parameters
value (Nullable <(Of <(<' DateTimeOffset >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Decimal>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<decimal> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of Decimal) _
) As JToken
static implicit operator JToken^ (
    Nullable<Decimal> value
)
Parameters
value (Nullable <(Of <(<' Decimal >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Double>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<double> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of Double) _
) As JToken
static implicit operator JToken^ (
    Nullable<double> value
)
Parameters
value (Nullable <(Of <(<' Double >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Int16>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<short> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of Short) _
) As JToken
static implicit operator JToken^ (
    Nullable<short> value
)
Parameters
value (Nullable <(Of <(<' Int16 >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Int32>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<int> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of Integer) _
) As JToken
static implicit operator JToken^ (
    Nullable<int> value
)
Parameters
value (Nullable <(Of <(<' Int32 >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Int64>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<long> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of Long) _
) As JToken
static implicit operator JToken^ (
    Nullable<long long> value
)
Parameters
value (Nullable <(Of <(<' Int64 >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(Single>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<float> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of Single) _
) As JToken
static implicit operator JToken^ (
    Nullable<float> value
)
Parameters
value (Nullable <(Of <(<' Single >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(UInt16>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<ushort> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of UShort) _
) As JToken
static implicit operator JToken^ (
    Nullable<unsigned short> value
)
Parameters
value (Nullable <(Of <(<' UInt16 >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(UInt32>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<uint> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of UInteger) _
) As JToken
static implicit operator JToken^ (
    Nullable<unsigned int> value
)
Parameters
value (Nullable <(Of <(<' UInt32 >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Nullable<(Of <<'(UInt64>)>>) to JToken)
Performs an implicit conversion from Nullable<(Of <(<'T>)>)> to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    Nullable<ulong> value
)
Public Shared Widening Operator CType ( _
    value As Nullable(Of ULong) _
) As JToken
static implicit operator JToken^ (
    Nullable<unsigned long long> value
)
Parameters
value (Nullable <(Of <(<' UInt64 >)>)>)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(Single to JToken)
Performs an implicit conversion from Single to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    float value
)
Public Shared Widening Operator CType ( _
    value As Single _
) As JToken
static implicit operator JToken^ (
    float value
)
Parameters
value (Single)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(String to JToken)
Performs an implicit conversion from String to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    string value
)
Public Shared Widening Operator CType ( _
    value As String _
) As JToken
static implicit operator JToken^ (
    String^ value
)
Parameters
value (String)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(UInt16 to JToken)
Performs an implicit conversion from UInt16 to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    ushort value
)
Public Shared Widening Operator CType ( _
    value As UShort _
) As JToken
static implicit operator JToken^ (
    unsigned short value
)
Parameters
value (UInt16)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(UInt32 to JToken)
Performs an implicit conversion from UInt32 to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    uint value
)
Public Shared Widening Operator CType ( _
    value As UInteger _
) As JToken
static implicit operator JToken^ (
    unsigned int value
)
Parameters
value (UInt32)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Implicit Operator

Implicit Operator
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ImplicitWideningImplicitImplicitImplicit(UInt64 to JToken)
Performs an implicit conversion from UInt64 to JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static implicit operator JToken (
    ulong value
)
Public Shared Widening Operator CType ( _
    value As ULong _
) As JToken
static implicit operator JToken^ (
    unsigned long long value
)
Parameters
value (UInt64)
The value to create a JValue from.
Return Value
The JValue initialized with the specified value.


Item Property (key)

Item Property (key)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Item[([( Object])])
Gets the JToken with the specified key.
Declaration Syntax
C# Visual Basic Visual C++
public virtual JToken this[
    Object key
] { get; set; }
Public Overridable Default Property Item ( _
    key As Object _
) As JToken
    Get
    Set
public:
virtual property JToken^ default[Object^ key] {
    JToken^ get (Object^ key);
    void set (Object^ key, JToken^ value);
}
Parameters
key (Object)
Value
The JToken with the specified key.


Last Property

Last Property
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Last
Get the last child token of this token.
Declaration Syntax
C# Visual Basic Visual C++
public virtual JToken Last { get; }
Public Overridable ReadOnly Property Last As JToken
    Get
public:
virtual property JToken^ Last {
    JToken^ get ();
}
Value
A JToken containing the last child token of the JToken.


Load Method (reader)

Load Method (reader)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Load(JsonReader)
Creates a JToken from a JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public static JToken Load(
    JsonReader reader
)
Public Shared Function Load ( _
    reader As JsonReader _
) As JToken
public:
static JToken^ Load(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
An JsonReader positioned at the token to read into this JToken.
Return Value
An JToken that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader.


Next Property

Next Property
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Next
Gets the next sibling token of this node.
Declaration Syntax
C# Visual Basic Visual C++
public JToken Next { get; internal set; }
Public Property Next As JToken
    Get
    Friend Set
public:
property JToken^ Next {
    JToken^ get ();
    internal: void set (JToken^ value);
}
Value
The JToken that contains the next sibling token.


Parent Property

Parent Property
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Parent
Gets or sets the parent.
Declaration Syntax
C# Visual Basic Visual C++
public JContainer Parent { get; internal set; }
Public Property Parent As JContainer
    Get
    Friend Set
public:
property JContainer^ Parent {
    JContainer^ get ();
    internal: void set (JContainer^ value);
}
Value
The parent.


Parse Method (json)

Parse Method (json)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Parse(String)
Load a JToken from a string that contains JSON.
Declaration Syntax
C# Visual Basic Visual C++
public static JToken Parse(
    string json
)
Public Shared Function Parse ( _
    json As String _
) As JToken
public:
static JToken^ Parse(
    String^ json
)
Parameters
json (String)
A String that contains JSON.
Return Value
A JToken populated from the string that contains JSON.


Previous Property

Previous Property
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Previous
Gets the previous sibling token of this node.
Declaration Syntax
C# Visual Basic Visual C++
public JToken Previous { get; }
Public ReadOnly Property Previous As JToken
    Get
public:
property JToken^ Previous {
    JToken^ get ();
}
Value
The JToken that contains the previous sibling token.


ReadFrom Method (reader)

ReadFrom Method (reader)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ReadFrom(JsonReader)
Creates a JToken from a JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public static JToken ReadFrom(
    JsonReader reader
)
Public Shared Function ReadFrom ( _
    reader As JsonReader _
) As JToken
public:
static JToken^ ReadFrom(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
An JsonReader positioned at the token to read into this JToken.
Return Value
An JToken that contains the token and its descendant tokens that were read from the reader. The runtime type of the token is determined by the token type of the first token encountered in the reader.


Remove Method

Remove Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Remove()()()()
Removes this token from its parent.
Declaration Syntax
C# Visual Basic Visual C++
public void Remove()
Public Sub Remove
public:
void Remove()


Replace Method (value)

Replace Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Replace(JToken)
Replaces this token with the specified token.
Declaration Syntax
C# Visual Basic Visual C++
public void Replace(
    JToken value
)
Public Sub Replace ( _
    value As JToken _
)
public:
void Replace(
    JToken^ value
)
Parameters
value (JToken)
The value.


Root Property

Root Property
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Root
Gets the root JToken of this JToken.
Declaration Syntax
C# Visual Basic Visual C++
public JToken Root { get; }
Public ReadOnly Property Root As JToken
    Get
public:
property JToken^ Root {
    JToken^ get ();
}
Value
The root JToken of this JToken.


SelectToken Method

SelectToken Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► SelectToken()()()()
Members
Icon | Member | Description
 | SelectToken(String) | Selects the token that matches the object path.
 | SelectToken(String, Boolean) | Selects the token that matches the object path.


SelectToken Method (path)

SelectToken Method (path)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► SelectToken(String)
Selects the token that matches the object path.
Declaration Syntax
C# Visual Basic Visual C++
public JToken SelectToken(
    string path
)
Public Function SelectToken ( _
    path As String _
) As JToken
public:
JToken^ SelectToken(
    String^ path
)
Parameters
path (String)
The object path from the current JToken to the JToken to be returned. This must be a string of property names or array indexes separated by periods, such as
CopyC#
Tables[0].DefaultView[0].Price
 in C# or
CopyC#
Tables(0).DefaultView(0).Price
 in Visual Basic.
Return Value
The JToken that matches the object path or a null reference if no matching token is found.


SelectToken Method (path, errorWhenNoMatch)

SelectToken Method (path, errorWhenNoMatch)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► SelectToken(String, Boolean)
Selects the token that matches the object path.
Declaration Syntax
C# Visual Basic Visual C++
public JToken SelectToken(
    string path,
    bool errorWhenNoMatch
)
Public Function SelectToken ( _
    path As String, _
    errorWhenNoMatch As Boolean _
) As JToken
public:
JToken^ SelectToken(
    String^ path,
    bool errorWhenNoMatch
)
Parameters
path (String)
The object path from the current JToken to the JToken to be returned. This must be a string of property names or array indexes separated by periods, such as
CopyC#
Tables[0].DefaultView[0].Price
 in C# or
CopyC#
Tables(0).DefaultView(0).Price
 in Visual Basic.
errorWhenNoMatch (Boolean)
A flag to indicate whether an error should be thrown if no token is found.
Return Value
The JToken that matches the object path.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ToString()()()()
Members
Icon | Member | Description
 | ToString()()()() | Returns the indented JSON for this token. (Overrides Object.ToString()()()().)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ToString()()()()
Returns the indented JSON for this token.
Declaration Syntax
C# Visual Basic Visual C++
public override string ToString()
Public Overrides Function ToString As String
public:
virtual String^ ToString() override
Return Value
The indented JSON for this token.


ToString Method (formatting, converters)

ToString Method (formatting, converters)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► ToString(Formatting, array<JsonConverter>[]()[][])
Returns the JSON for this token using the given formatting and converters.
Declaration Syntax
C# Visual Basic Visual C++
public string ToString(
    Formatting formatting,
    params JsonConverter[] converters
)
Public Function ToString ( _
    formatting As Formatting, _
    ParamArray converters As JsonConverter() _
) As String
public:
String^ ToString(
    Formatting formatting,
    ... array<JsonConverter^>^ converters
)
Parameters
formatting (Formatting)
Indicates how the output is formatted.
converters (array< JsonConverter >[]()[][])
A collection of JsonConverter which will be used when writing the token.
Return Value
The JSON for this token using the given formatting and converters.


Type Property

Type Property
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Type
Gets the node type for this JToken.
Declaration Syntax
C# Visual Basic Visual C++
public abstract JTokenType Type { get; }
Public MustOverride ReadOnly Property Type As JTokenType
    Get
public:
virtual property JTokenType Type {
    JTokenType get () abstract;
}
Value
The type.


Value Method (key)

Value<(Of <(<'T>)>)> Method (key)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Value<(Of <<'(T>)>>)(Object)
Gets the JToken with the specified key converted to the specified type.
Declaration Syntax
C# Visual Basic Visual C++
public virtual T Value<T>(
    Object key
)

Public Overridable Function Value(Of T) ( _
    key As Object _
) As T
public:
generic<typename T>
virtual T Value(
    Object^ key
)
Generic Template Parameters
T
The type to convert the token to.
Parameters
key (Object)
The token key.
Return Value
The converted token value.


Values Method

Values<(Of <(<'T>)>)> Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Values<(Of <<'(T>)>>)()()()()
Returns a collection of the child values of this token, in document order.
Declaration Syntax
C# Visual Basic Visual C++
public virtual IEnumerable<T> Values<T>()

Public Overridable Function Values(Of T) As IEnumerable(Of T)
public:
generic<typename T>
virtual IEnumerable<T>^ Values()
Generic Template Parameters
T
The type to convert the values to.
Return Value
A IEnumerable<(Of <(<'T>)>)> containing the child values of this JToken, in document order.


WriteTo Method (writer, converters)

WriteTo Method (writer, converters)
Namespaces ► Newtonsoft.Json.Linq ► JToken ► WriteTo(JsonWriter, array<JsonConverter>[]()[][])
Writes this token to a JsonWriter.
Declaration Syntax
C# Visual Basic Visual C++
public abstract void WriteTo(
    JsonWriter writer,
    params JsonConverter[] converters
)
Public MustOverride Sub WriteTo ( _
    writer As JsonWriter, _
    ParamArray converters As JsonConverter() _
)
public:
virtual void WriteTo(
    JsonWriter^ writer,
    ... array<JsonConverter^>^ converters
) abstract
Parameters
writer (JsonWriter)
A JsonWriter into which this method will write.
converters (array< JsonConverter >[]()[][])
A collection of JsonConverter which will be used when writing the token.


JTokenEqualityComparer Class

JTokenEqualityComparer Class
Namespaces ► Newtonsoft.Json.Linq ► JTokenEqualityComparer
Compares tokens to determine whether they are equal.
Declaration Syntax
C# Visual Basic Visual C++
public class JTokenEqualityComparer : IEqualityComparer<JToken>
Public Class JTokenEqualityComparer _
    Implements IEqualityComparer(Of JToken)
public ref class JTokenEqualityComparer : IEqualityComparer<JToken^>
Members
All Members | Constructors | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | JTokenEqualityComparer()()()() | Initializes a new instance of the JTokenEqualityComparer class
 | Equals(JToken, JToken) | Determines whether the specified objects are equal.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode(JToken) | Returns a hash code for the specified object.
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
JTokenEqualityComparer


JTokenEqualityComparer Constructor

JTokenEqualityComparer Constructor
Namespaces ► Newtonsoft.Json.Linq ► JTokenEqualityComparer ► JTokenEqualityComparer()()()()
Initializes a new instance of the JTokenEqualityComparer class
Declaration Syntax
C# Visual Basic Visual C++
public JTokenEqualityComparer()
Public Sub New
public:
JTokenEqualityComparer()


Equals Method (x, y)

Equals Method (x, y)
Namespaces ► Newtonsoft.Json.Linq ► JTokenEqualityComparer ► Equals(JToken, JToken)
Determines whether the specified objects are equal.
Declaration Syntax
C# Visual Basic Visual C++
public bool Equals(
    JToken x,
    JToken y
)
Public Function Equals ( _
    x As JToken, _
    y As JToken _
) As Boolean
public:
virtual bool Equals(
    JToken^ x,
    JToken^ y
) sealed
Parameters
x (JToken)
The first object of type JToken to compare.
y (JToken)
The second object of type JToken to compare.
Return Value
true if the specified objects are equal; otherwise, false.


GetHashCode Method (obj)

GetHashCode Method (obj)
Namespaces ► Newtonsoft.Json.Linq ► JTokenEqualityComparer ► GetHashCode(JToken)
Returns a hash code for the specified object.
Declaration Syntax
C# Visual Basic Visual C++
public int GetHashCode(
    JToken obj
)
Public Function GetHashCode ( _
    obj As JToken _
) As Integer
public:
virtual int GetHashCode(
    JToken^ obj
) sealed
Parameters
obj (JToken)
The Object for which a hash code is to be returned.
Return Value
A hash code for the specified object.
Exceptions
Exception | Condition
ArgumentNullException | The type of obj is a reference type and obj is null.


JTokenReader Class

JTokenReader Class
Namespaces ► Newtonsoft.Json.Linq ► JTokenReader
Represents a reader that provides fast, non-cached, forward-only access to serialized Json data.
Declaration Syntax
C# Visual Basic Visual C++
public class JTokenReader : JsonReader,
    IJsonLineInfo
Public Class JTokenReader _
    Inherits JsonReader _
    Implements IJsonLineInfo
public ref class JTokenReader : public JsonReader,
    IJsonLineInfo
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JTokenReader(JToken) | Initializes a new instance of the JTokenReader class.
 | Close()()()() | Changes the JsonReader..::..State to Closed. (Inherited from JsonReader.)
 | CloseInput | Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the reader is closed. (Inherited from JsonReader.)
 | CurrentState | Gets the current reader state. (Inherited from JsonReader.)
 | Depth | Gets the depth of the current token in the JSON document. (Inherited from JsonReader.)
 | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources (Inherited from JsonReader.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | QuoteChar | Gets the quotation mark character used to enclose the value of a string. (Inherited from JsonReader.)
 | Read()()()() | Reads the next JSON token from the stream. (Overrides JsonReader.Read()()()().)
 | ReadAsBytes()()()() | Reads the next JSON token from the stream as a array<Byte>[]()[][]. (Overrides JsonReader.ReadAsBytes()()()().)
 | ReadAsDateTimeOffset()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>. (Overrides JsonReader.ReadAsDateTimeOffset()()()().)
 | ReadAsDecimal()()()() | Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>. (Overrides JsonReader.ReadAsDecimal()()()().)
 | SetStateBasedOnCurrent()()()() | Sets the state based on current token type. (Inherited from JsonReader.)
 | SetToken(JsonToken) | Sets the current token. (Inherited from JsonReader.)
 | SetToken(JsonToken, Object) | Sets the current token and value. (Inherited from JsonReader.)
 | Skip()()()() | Skips the children of the current token. (Inherited from JsonReader.)
 | TokenType | Gets the type of the current Json token. (Inherited from JsonReader.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | Value | Gets the text value of the current Json token. (Inherited from JsonReader.)
 | ValueType | Gets The Common Language Runtime (CLR) type for the current Json token. (Inherited from JsonReader.)
Inheritance Hierarchy
Object
 | JsonReader
 |  | JTokenReader


JTokenReader Constructor (token)

JTokenReader Constructor (token)
Namespaces ► Newtonsoft.Json.Linq ► JTokenReader ► JTokenReader(JToken)
Initializes a new instance of the JTokenReader class.
Declaration Syntax
C# Visual Basic Visual C++
public JTokenReader(
    JToken token
)
Public Sub New ( _
    token As JToken _
)
public:
JTokenReader(
    JToken^ token
)
Parameters
token (JToken)
The token to read from.


Read Method

Read Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenReader ► Read()()()()
Reads the next JSON token from the stream.
Declaration Syntax
C# Visual Basic Visual C++
public override bool Read()
Public Overrides Function Read As Boolean
public:
virtual bool Read() override
Return Value
true if the next token was read successfully; false if there are no more tokens to read.


ReadAsBytes Method

ReadAsBytes Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenReader ► ReadAsBytes()()()()
Reads the next JSON token from the stream as a array<Byte>[]()[][].
Declaration Syntax
C# Visual Basic Visual C++
public override byte[] ReadAsBytes()
Public Overrides Function ReadAsBytes As Byte()
public:
virtual array<unsigned char>^ ReadAsBytes() override
Return Value
A array<Byte>[]()[][] or a null reference if the next JSON token is null.


ReadAsDateTimeOffset Method

ReadAsDateTimeOffset Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenReader ► ReadAsDateTimeOffset()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public override Nullable<DateTimeOffset> ReadAsDateTimeOffset()
Public Overrides Function ReadAsDateTimeOffset As Nullable(Of DateTimeOffset)
public:
virtual Nullable<DateTimeOffset> ReadAsDateTimeOffset() override
Return Value
A Nullable<(Of <(<'T>)>)>.


ReadAsDecimal Method

ReadAsDecimal Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenReader ► ReadAsDecimal()()()()
Reads the next JSON token from the stream as a Nullable<(Of <(<'T>)>)>.
Declaration Syntax
C# Visual Basic Visual C++
public override Nullable<decimal> ReadAsDecimal()
Public Overrides Function ReadAsDecimal As Nullable(Of Decimal)
public:
virtual Nullable<Decimal> ReadAsDecimal() override
Return Value
A Nullable<(Of <(<'T>)>)>.


JTokenType Enumeration

JTokenType Enumeration
Namespaces ► Newtonsoft.Json.Linq ► JTokenType
Specifies the type of token.
Declaration Syntax
C# Visual Basic Visual C++
public enum JTokenType
Public Enumeration JTokenType
public enum class JTokenType
Members
Member | Description
None | No token type has been set.
Object | A JSON object.
Array | A JSON array.
Constructor | A JSON constructor.
Property | A JSON object property.
Comment | A comment.
Integer | An integer value.
Float | A float value.
String | A string value.
Boolean | A boolean value.
Null | A null value.
Undefined | An undefined value.
Date | A date value.
Raw | A raw JSON value.
Bytes | A collection of bytes value.


JTokenWriter Class

JTokenWriter Class
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter
Represents a writer that provides a fast, non-cached, forward-only way of generating Json data.
Declaration Syntax
C# Visual Basic Visual C++
public class JTokenWriter : JsonWriter
Public Class JTokenWriter _
    Inherits JsonWriter
public ref class JTokenWriter : public JsonWriter
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon Member Description
JTokenWriter(JContainer)
Initializes a new instance of the JTokenWriter class writing to the given JContainer.

JTokenWriter()()()()
Initializes a new instance of the JTokenWriter class.

Close()()()()
Closes this stream and the underlying stream.
(Overrides JsonWriter.Close()()()().)
CloseOutput
Gets or sets a value indicating whether the underlying stream or TextReader should be closed when the writer is closed.
(Inherited from JsonWriter.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Flush()()()()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
(Overrides JsonWriter.Flush()()()().)
Formatting
Indicates how the output is formatted.
(Inherited from JsonWriter.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Token
Gets the token being writen.

Top
Gets the top.
(Inherited from JsonWriter.)
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
WriteComment(String)
Writes out a comment
CopyC#
/*...*/
 containing the specified text.
(Overrides JsonWriter.WriteComment(String).)
WriteEnd(JsonToken)
Writes the end.
(Overrides JsonWriter.WriteEnd(JsonToken).)
WriteEnd()()()()
Writes the end of the current Json object or array.
(Inherited from JsonWriter.)
WriteEndArray()()()()
Writes the end of an array.
(Inherited from JsonWriter.)
WriteEndConstructor()()()()
Writes the end constructor.
(Inherited from JsonWriter.)
WriteEndObject()()()()
Writes the end of a Json object.
(Inherited from JsonWriter.)
WriteIndent()()()()
Writes indent characters.
(Inherited from JsonWriter.)
WriteIndentSpace()()()()
Writes an indent space.
(Inherited from JsonWriter.)
WriteNull()()()()
Writes a null value.
(Overrides JsonWriter.WriteNull()()()().)
WritePropertyName(String)
Writes the property name of a name/value pair on a Json object.
(Overrides JsonWriter.WritePropertyName(String).)
WriteRaw(String)
Writes raw JSON.
(Overrides JsonWriter.WriteRaw(String).)
WriteRawValue(String)
Writes raw JSON where a value is expected and updates the writer's state.
(Inherited from JsonWriter.)
WriteStartArray()()()()
Writes the beginning of a Json array.
(Overrides JsonWriter.WriteStartArray()()()().)
WriteStartConstructor(String)
Writes the start of a constructor with the given name.
(Overrides JsonWriter.WriteStartConstructor(String).)
WriteStartObject()()()()
Writes the beginning of a Json object.
(Overrides JsonWriter.WriteStartObject()()()().)
WriteState
Gets the state of the writer.
(Inherited from JsonWriter.)
WriteToken(JsonReader)
Writes the current JsonReader token.
(Inherited from JsonWriter.)
WriteUndefined()()()()
Writes an undefined value.
(Overrides JsonWriter.WriteUndefined()()()().)
WriteValue(String)
Writes a String value.
(Overrides JsonWriter.WriteValue(String).)
WriteValue(Int32)
Writes a Int32 value.
(Overrides JsonWriter.WriteValue(Int32).)
WriteValue(UInt32)
Writes a UInt32 value.
(Overrides JsonWriter.WriteValue(UInt32).)
WriteValue(Int64)
Writes a Int64 value.
(Overrides JsonWriter.WriteValue(Int64).)
WriteValue(UInt64)
Writes a UInt64 value.
(Overrides JsonWriter.WriteValue(UInt64).)
WriteValue(Single)
Writes a Single value.
(Overrides JsonWriter.WriteValue(Single).)
WriteValue(Double)
Writes a Double value.
(Overrides JsonWriter.WriteValue(Double).)
WriteValue(Boolean)
Writes a Boolean value.
(Overrides JsonWriter.WriteValue(Boolean).)
WriteValue(Int16)
Writes a Int16 value.
(Overrides JsonWriter.WriteValue(Int16).)
WriteValue(UInt16)
Writes a UInt16 value.
(Overrides JsonWriter.WriteValue(UInt16).)
WriteValue(Char)
Writes a Char value.
(Overrides JsonWriter.WriteValue(Char).)
WriteValue(Byte)
Writes a Byte value.
(Overrides JsonWriter.WriteValue(Byte).)
WriteValue(SByte)
Writes a SByte value.
(Overrides JsonWriter.WriteValue(SByte).)
WriteValue(Decimal)
Writes a Decimal value.
(Overrides JsonWriter.WriteValue(Decimal).)
WriteValue(DateTime)
Writes a DateTime value.
(Overrides JsonWriter.WriteValue(DateTime).)
WriteValue(DateTimeOffset)
Writes a DateTimeOffset value.
(Overrides JsonWriter.WriteValue(DateTimeOffset).)
WriteValue(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value.
(Overrides JsonWriter.WriteValue(array<Byte>[]()[][]).)
WriteValue(Nullable<(Of <<'(Int32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt32>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Int64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt64>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Single>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Double>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Boolean>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Int16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(UInt16>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Char>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Byte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(SByte>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(Decimal>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(DateTime>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>))
Writes a Nullable<(Of <(<'T>)>)> value.
(Inherited from JsonWriter.)
WriteValue(Object)
Writes a Object value. An error will raised if the value cannot be written as a single JSON token.
(Inherited from JsonWriter.)
WriteValueDelimiter()()()()
Writes the JSON value delimiter.
(Inherited from JsonWriter.)
WriteWhitespace(String)
Writes out the given white space.
(Inherited from JsonWriter.)
Inheritance Hierarchy
Object
 | JsonWriter
 |  | JTokenWriter


JTokenWriter Constructor

JTokenWriter Constructor
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► JTokenWriter()()()()
Members
Icon | Member | Description
 | JTokenWriter(JContainer) | Initializes a new instance of the JTokenWriter class writing to the given JContainer.
 | JTokenWriter()()()() | Initializes a new instance of the JTokenWriter class.


JTokenWriter Constructor

JTokenWriter Constructor
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► JTokenWriter()()()()
Initializes a new instance of the JTokenWriter class.
Declaration Syntax
C# Visual Basic Visual C++
public JTokenWriter()
Public Sub New
public:
JTokenWriter()


JTokenWriter Constructor (container)

JTokenWriter Constructor (container)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► JTokenWriter(JContainer)
Initializes a new instance of the JTokenWriter class writing to the given JContainer.
Declaration Syntax
C# Visual Basic Visual C++
public JTokenWriter(
    JContainer container
)
Public Sub New ( _
    container As JContainer _
)
public:
JTokenWriter(
    JContainer^ container
)
Parameters
container (JContainer)
The container being written to.


Close Method

Close Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► Close()()()()
Closes this stream and the underlying stream.
Declaration Syntax
C# Visual Basic Visual C++
public override void Close()
Public Overrides Sub Close
public:
virtual void Close() override


Flush Method

Flush Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► Flush()()()()
Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream.
Declaration Syntax
C# Visual Basic Visual C++
public override void Flush()
Public Overrides Sub Flush
public:
virtual void Flush() override


Token Property

Token Property
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► Token
Gets the token being writen.
Declaration Syntax
C# Visual Basic Visual C++
public JToken Token { get; }
Public ReadOnly Property Token As JToken
    Get
public:
property JToken^ Token {
    JToken^ get ();
}
Value
The token being writen.


WriteComment Method (text)

WriteComment Method (text)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteComment(String)
Writes out a comment
CopyC#
/*...*/
 containing the specified text.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteComment(
    string text
)
Public Overrides Sub WriteComment ( _
    text As String _
)
public:
virtual void WriteComment(
    String^ text
) override
Parameters
text (String)
Text to place inside the comment.


WriteEnd Method (token)

WriteEnd Method (token)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteEnd(JsonToken)
Writes the end.
Declaration Syntax
C# Visual Basic Visual C++
protected override void WriteEnd(
    JsonToken token
)
Protected Overrides Sub WriteEnd ( _
    token As JsonToken _
)
protected:
virtual void WriteEnd(
    JsonToken token
) override
Parameters
token (JsonToken)
The token.


WriteNull Method

WriteNull Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteNull()()()()
Writes a null value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteNull()
Public Overrides Sub WriteNull
public:
virtual void WriteNull() override


WritePropertyName Method (name)

WritePropertyName Method (name)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WritePropertyName(String)
Writes the property name of a name/value pair on a Json object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WritePropertyName(
    string name
)
Public Overrides Sub WritePropertyName ( _
    name As String _
)
public:
virtual void WritePropertyName(
    String^ name
) override
Parameters
name (String)
The name of the property.


WriteRaw Method (json)

WriteRaw Method (json)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteRaw(String)
Writes raw JSON.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteRaw(
    string json
)
Public Overrides Sub WriteRaw ( _
    json As String _
)
public:
virtual void WriteRaw(
    String^ json
) override
Parameters
json (String)
The raw JSON to write.


WriteStartArray Method

WriteStartArray Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteStartArray()()()()
Writes the beginning of a Json array.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteStartArray()
Public Overrides Sub WriteStartArray
public:
virtual void WriteStartArray() override


WriteStartConstructor Method (name)

WriteStartConstructor Method (name)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteStartConstructor(String)
Writes the start of a constructor with the given name.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteStartConstructor(
    string name
)
Public Overrides Sub WriteStartConstructor ( _
    name As String _
)
public:
virtual void WriteStartConstructor(
    String^ name
) override
Parameters
name (String)
The name of the constructor.


WriteStartObject Method

WriteStartObject Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteStartObject()()()()
Writes the beginning of a Json object.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteStartObject()
Public Overrides Sub WriteStartObject
public:
virtual void WriteStartObject() override


WriteUndefined Method

WriteUndefined Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteUndefined()()()()
Writes an undefined value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteUndefined()
Public Overrides Sub WriteUndefined
public:
virtual void WriteUndefined() override


WriteValue Method

WriteValue Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue()()()()
Members
Icon | Member | Description
 | WriteValue(String) | Writes a String value. (Overrides JsonWriter.WriteValue(String).)
 | WriteValue(Int32) | Writes a Int32 value. (Overrides JsonWriter.WriteValue(Int32).)
 | WriteValue(UInt32) | Writes a UInt32 value. (Overrides JsonWriter.WriteValue(UInt32).)
 | WriteValue(Int64) | Writes a Int64 value. (Overrides JsonWriter.WriteValue(Int64).)
 | WriteValue(UInt64) | Writes a UInt64 value. (Overrides JsonWriter.WriteValue(UInt64).)
 | WriteValue(Single) | Writes a Single value. (Overrides JsonWriter.WriteValue(Single).)
 | WriteValue(Double) | Writes a Double value. (Overrides JsonWriter.WriteValue(Double).)
 | WriteValue(Boolean) | Writes a Boolean value. (Overrides JsonWriter.WriteValue(Boolean).)
 | WriteValue(Int16) | Writes a Int16 value. (Overrides JsonWriter.WriteValue(Int16).)
 | WriteValue(UInt16) | Writes a UInt16 value. (Overrides JsonWriter.WriteValue(UInt16).)
 | WriteValue(Char) | Writes a Char value. (Overrides JsonWriter.WriteValue(Char).)
 | WriteValue(Byte) | Writes a Byte value. (Overrides JsonWriter.WriteValue(Byte).)
 | WriteValue(SByte) | Writes a SByte value. (Overrides JsonWriter.WriteValue(SByte).)
 | WriteValue(Decimal) | Writes a Decimal value. (Overrides JsonWriter.WriteValue(Decimal).)
 | WriteValue(DateTime) | Writes a DateTime value. (Overrides JsonWriter.WriteValue(DateTime).)
 | WriteValue(DateTimeOffset) | Writes a DateTimeOffset value. (Overrides JsonWriter.WriteValue(DateTimeOffset).)
 | WriteValue(array<Byte>[]()[][]) | Writes a array<Byte>[]()[][] value. (Overrides JsonWriter.WriteValue(array<Byte>[]()[][]).)
 | WriteValue(Nullable<(Of <<'(Int32>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt32>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Int64>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt64>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Single>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Double>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Boolean>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Int16>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(UInt16>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Char>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Byte>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(SByte>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(Decimal>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(DateTime>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Nullable<(Of <<'(DateTimeOffset>)>>)) | Writes a Nullable<(Of <(<'T>)>)> value.
 | WriteValue(Object) | Writes a Object value. An error will raised if the value cannot be written as a single JSON token.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(Boolean)
Writes a Boolean value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    bool value
)
Public Overrides Sub WriteValue ( _
    value As Boolean _
)
public:
virtual void WriteValue(
    bool value
) override
Parameters
value (Boolean)
The Boolean value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(Byte)
Writes a Byte value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    byte value
)
Public Overrides Sub WriteValue ( _
    value As Byte _
)
public:
virtual void WriteValue(
    unsigned char value
) override
Parameters
value (Byte)
The Byte value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(array<Byte>[]()[][])
Writes a array<Byte>[]()[][] value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    byte[] value
)
Public Overrides Sub WriteValue ( _
    value As Byte() _
)
public:
virtual void WriteValue(
    array<unsigned char>^ value
) override
Parameters
value (array< Byte >[]()[][])
The array<Byte>[]()[][] value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(Char)
Writes a Char value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    char value
)
Public Overrides Sub WriteValue ( _
    value As Char _
)
public:
virtual void WriteValue(
    wchar_t value
) override
Parameters
value (Char)
The Char value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(DateTime)
Writes a DateTime value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    DateTime value
)
Public Overrides Sub WriteValue ( _
    value As DateTime _
)
public:
virtual void WriteValue(
    DateTime value
) override
Parameters
value (DateTime)
The DateTime value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(DateTimeOffset)
Writes a DateTimeOffset value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    DateTimeOffset value
)
Public Overrides Sub WriteValue ( _
    value As DateTimeOffset _
)
public:
virtual void WriteValue(
    DateTimeOffset value
) override
Parameters
value (DateTimeOffset)
The DateTimeOffset value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(Decimal)
Writes a Decimal value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    decimal value
)
Public Overrides Sub WriteValue ( _
    value As Decimal _
)
public:
virtual void WriteValue(
    Decimal value
) override
Parameters
value (Decimal)
The Decimal value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(Double)
Writes a Double value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    double value
)
Public Overrides Sub WriteValue ( _
    value As Double _
)
public:
virtual void WriteValue(
    double value
) override
Parameters
value (Double)
The Double value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(Int16)
Writes a Int16 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    short value
)
Public Overrides Sub WriteValue ( _
    value As Short _
)
public:
virtual void WriteValue(
    short value
) override
Parameters
value (Int16)
The Int16 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(Int32)
Writes a Int32 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    int value
)
Public Overrides Sub WriteValue ( _
    value As Integer _
)
public:
virtual void WriteValue(
    int value
) override
Parameters
value (Int32)
The Int32 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(Int64)
Writes a Int64 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    long value
)
Public Overrides Sub WriteValue ( _
    value As Long _
)
public:
virtual void WriteValue(
    long long value
) override
Parameters
value (Int64)
The Int64 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(SByte)
Writes a SByte value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    sbyte value
)
Public Overrides Sub WriteValue ( _
    value As SByte _
)
public:
virtual void WriteValue(
    signed char value
) override
Parameters
value (SByte)
The SByte value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(Single)
Writes a Single value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    float value
)
Public Overrides Sub WriteValue ( _
    value As Single _
)
public:
virtual void WriteValue(
    float value
) override
Parameters
value (Single)
The Single value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(String)
Writes a String value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    string value
)
Public Overrides Sub WriteValue ( _
    value As String _
)
public:
virtual void WriteValue(
    String^ value
) override
Parameters
value (String)
The String value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(UInt16)
Writes a UInt16 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    ushort value
)
Public Overrides Sub WriteValue ( _
    value As UShort _
)
public:
virtual void WriteValue(
    unsigned short value
) override
Parameters
value (UInt16)
The UInt16 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(UInt32)
Writes a UInt32 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    uint value
)
Public Overrides Sub WriteValue ( _
    value As UInteger _
)
public:
virtual void WriteValue(
    unsigned int value
) override
Parameters
value (UInt32)
The UInt32 value to write.


WriteValue Method (value)

WriteValue Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteValue(UInt64)
Writes a UInt64 value.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteValue(
    ulong value
)
Public Overrides Sub WriteValue ( _
    value As ULong _
)
public:
virtual void WriteValue(
    unsigned long long value
) override
Parameters
value (UInt64)
The UInt64 value to write.


JValue Class

JValue Class
Namespaces ► Newtonsoft.Json.Linq ► JValue
Represents a value in JSON (string, integer, date, etc).
Declaration Syntax
C# Visual Basic Visual C++
public class JValue : JToken, IEquatable<JValue>,
    IFormattable, IComparable, IComparable<JValue>
Public Class JValue _
    Inherits JToken _
    Implements IEquatable(Of JValue), IFormattable,  _
    IComparable, IComparable(Of JValue)
public ref class JValue : public JToken,
    IEquatable<JValue^>, IFormattable, IComparable, IComparable<JValue^>
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JValue(JValue) | Initializes a new instance of the JValue class from another JValue object.
 | JValue(Int64) | Initializes a new instance of the JValue class with the given value.
 | JValue(UInt64) | Initializes a new instance of the JValue class with the given value.
 | JValue(Double) | Initializes a new instance of the JValue class with the given value.
 | JValue(DateTime) | Initializes a new instance of the JValue class with the given value.
 | JValue(Boolean) | Initializes a new instance of the JValue class with the given value.
 | JValue(String) | Initializes a new instance of the JValue class with the given value.
 | JValue(Object) | Initializes a new instance of the JValue class with the given value.
 | AddAfterSelf(Object) | Adds the specified content immediately after this token. (Inherited from JToken.)
 | AddBeforeSelf(Object) | Adds the specified content immediately before this token. (Inherited from JToken.)
 | AfterSelf()()()() | Returns a collection of the sibling tokens after this token, in document order. (Inherited from JToken.)
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token. (Inherited from JToken.)
 | BeforeSelf()()()() | Returns a collection of the sibling tokens before this token, in document order. (Inherited from JToken.)
 | Children()()()() | Returns a collection of the child tokens of this token, in document order. (Inherited from JToken.)
 | CompareTo(JValue) | Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
 | CreateComment(String) | Creates a JValue comment with the given value.
 | CreateReader()()()() | Creates an JsonReader for this token. (Inherited from JToken.)
 | CreateString(String) | Creates a JValue string with the given value.
 | DeepClone()()()() | Creates a new instance of the JToken. All child tokens are recursively cloned. (Inherited from JToken.)
 | Equals(JValue) | Indicates whether the current object is equal to another object of the same type.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Overrides Object.Equals(Object).)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | First | Get the first child token of this token. (Inherited from JToken.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Overrides Object.GetHashCode()()()().)
 | GetMetaObject(Expression) | Returns the DynamicMetaObject responsible for binding operations performed on this object. (Overrides JToken.GetMetaObject(Expression).)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | HasValues | Gets a value indicating whether this token has childen tokens. (Overrides JToken.HasValues.)
 | IsValid(JToken, JsonSchema) | Determines whether the JToken is valid. (Inherited from Extensions.)
 | Item[([( Object])]) | Gets the JToken with the specified key. (Inherited from JToken.)
 | Last | Get the last child token of this token. (Inherited from JToken.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Next | Gets the next sibling token of this node. (Inherited from JToken.)
 | Parent | Gets or sets the parent. (Inherited from JToken.)
 | Previous | Gets the previous sibling token of this node. (Inherited from JToken.)
 | Remove()()()() | Removes this token from its parent. (Inherited from JToken.)
 | Replace(JToken) | Replaces this token with the specified token. (Inherited from JToken.)
 | Root | Gets the root JToken of this JToken. (Inherited from JToken.)
 | SelectToken(String) | Selects the token that matches the object path. (Inherited from JToken.)
 | SelectToken(String, Boolean) | Selects the token that matches the object path. (Inherited from JToken.)
 | ToString()()()() | Returns a String that represents this instance. (Overrides JToken.ToString()()()().)
 | ToString(String) | Returns a String that represents this instance.
 | ToString(IFormatProvider) | Returns a String that represents this instance.
 | ToString(String, IFormatProvider) | Returns a String that represents this instance.
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters. (Inherited from JToken.)
 | Type | Gets the node type for this JToken. (Overrides JToken.Type.)
 | Validate(JToken, JsonSchema) | Validates the specified JToken. (Inherited from Extensions.)
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken. (Inherited from Extensions.)
 | Value | Gets or sets the underlying token value.
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type. (Inherited from JToken.)
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order. (Inherited from JToken.)
 | WriteTo(JsonWriter, array<JsonConverter>[]()[][]) | Writes this token to a JsonWriter. (Overrides JToken.WriteTo(JsonWriter, array<JsonConverter>[]()[][]).)
Inheritance Hierarchy
Object
 | JToken
 |  | JValue
 |  |  | JRaw


JValue Constructor

JValue Constructor
Namespaces ► Newtonsoft.Json.Linq ► JValue ► JValue()()()()
Members
Icon | Member | Description
 | JValue(JValue) | Initializes a new instance of the JValue class from another JValue object.
 | JValue(Int64) | Initializes a new instance of the JValue class with the given value.
 | JValue(UInt64) | Initializes a new instance of the JValue class with the given value.
 | JValue(Double) | Initializes a new instance of the JValue class with the given value.
 | JValue(DateTime) | Initializes a new instance of the JValue class with the given value.
 | JValue(Boolean) | Initializes a new instance of the JValue class with the given value.
 | JValue(String) | Initializes a new instance of the JValue class with the given value.
 | JValue(Object) | Initializes a new instance of the JValue class with the given value.


JValue Constructor (other)

JValue Constructor (other)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► JValue(JValue)
Initializes a new instance of the JValue class from another JValue object.
Declaration Syntax
C# Visual Basic Visual C++
public JValue(
    JValue other
)
Public Sub New ( _
    other As JValue _
)
public:
JValue(
    JValue^ other
)
Parameters
other (JValue)
A JValue object to copy from.


JValue Constructor (value)

JValue Constructor (value)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► JValue(Boolean)
Initializes a new instance of the JValue class with the given value.
Declaration Syntax
C# Visual Basic Visual C++
public JValue(
    bool value
)
Public Sub New ( _
    value As Boolean _
)
public:
JValue(
    bool value
)
Parameters
value (Boolean)
The value.


JValue Constructor (value)

JValue Constructor (value)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► JValue(DateTime)
Initializes a new instance of the JValue class with the given value.
Declaration Syntax
C# Visual Basic Visual C++
public JValue(
    DateTime value
)
Public Sub New ( _
    value As DateTime _
)
public:
JValue(
    DateTime value
)
Parameters
value (DateTime)
The value.


JValue Constructor (value)

JValue Constructor (value)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► JValue(Double)
Initializes a new instance of the JValue class with the given value.
Declaration Syntax
C# Visual Basic Visual C++
public JValue(
    double value
)
Public Sub New ( _
    value As Double _
)
public:
JValue(
    double value
)
Parameters
value (Double)
The value.


JValue Constructor (value)

JValue Constructor (value)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► JValue(Int64)
Initializes a new instance of the JValue class with the given value.
Declaration Syntax
C# Visual Basic Visual C++
public JValue(
    long value
)
Public Sub New ( _
    value As Long _
)
public:
JValue(
    long long value
)
Parameters
value (Int64)
The value.


JValue Constructor (value)

JValue Constructor (value)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► JValue(Object)
Initializes a new instance of the JValue class with the given value.
Declaration Syntax
C# Visual Basic Visual C++
public JValue(
    Object value
)
Public Sub New ( _
    value As Object _
)
public:
JValue(
    Object^ value
)
Parameters
value (Object)
The value.


JValue Constructor (value)

JValue Constructor (value)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► JValue(String)
Initializes a new instance of the JValue class with the given value.
Declaration Syntax
C# Visual Basic Visual C++
public JValue(
    string value
)
Public Sub New ( _
    value As String _
)
public:
JValue(
    String^ value
)
Parameters
value (String)
The value.


JValue Constructor (value)

JValue Constructor (value)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► JValue(UInt64)
Initializes a new instance of the JValue class with the given value.
Declaration Syntax
C# Visual Basic Visual C++
public JValue(
    ulong value
)
Public Sub New ( _
    value As ULong _
)
public:
JValue(
    unsigned long long value
)
Parameters
value (UInt64)
The value.


CompareTo Method (obj)

CompareTo Method (obj)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► CompareTo(JValue)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Declaration Syntax
C# Visual Basic Visual C++
public int CompareTo(
    JValue obj
)
Public Function CompareTo ( _
    obj As JValue _
) As Integer
public:
virtual int CompareTo(
    JValue^ obj
) sealed
Parameters
obj (JValue)
An object to compare with this instance.
Return Value
A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj.
Exceptions
Exception | Condition
ArgumentException | obj is not the same type as this instance.


CreateComment Method (value)

CreateComment Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► CreateComment(String)
Creates a JValue comment with the given value.
Declaration Syntax
C# Visual Basic Visual C++
public static JValue CreateComment(
    string value
)
Public Shared Function CreateComment ( _
    value As String _
) As JValue
public:
static JValue^ CreateComment(
    String^ value
)
Parameters
value (String)
The value.
Return Value
A JValue comment with the given value.


CreateString Method (value)

CreateString Method (value)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► CreateString(String)
Creates a JValue string with the given value.
Declaration Syntax
C# Visual Basic Visual C++
public static JValue CreateString(
    string value
)
Public Shared Function CreateString ( _
    value As String _
) As JValue
public:
static JValue^ CreateString(
    String^ value
)
Parameters
value (String)
The value.
Return Value
A JValue string with the given value.


Equals Method

Equals Method
Namespaces ► Newtonsoft.Json.Linq ► JValue ► Equals()()()()
Members
Icon | Member | Description
 | Equals(JValue) | Indicates whether the current object is equal to another object of the same type.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Overrides Object.Equals(Object).)


Equals Method (other)

Equals Method (other)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► Equals(JValue)
Indicates whether the current object is equal to another object of the same type.
Declaration Syntax
C# Visual Basic Visual C++
public bool Equals(
    JValue other
)
Public Function Equals ( _
    other As JValue _
) As Boolean
public:
virtual bool Equals(
    JValue^ other
) sealed
Parameters
other (JValue)
An object to compare with this object.
Return Value
true if the current object is equal to the other parameter; otherwise, false.


Equals Method (obj)

Equals Method (obj)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► Equals(Object)
Determines whether the specified Object is equal to the current Object.
Declaration Syntax
C# Visual Basic Visual C++
public override bool Equals(
    Object obj
)
Public Overrides Function Equals ( _
    obj As Object _
) As Boolean
public:
virtual bool Equals(
    Object^ obj
) override
Parameters
obj (Object)
The Object to compare with the current Object.
Return Value
true if the specified Object is equal to the current Object; otherwise, false.
Exceptions
Exception | Condition
NullReferenceException | The obj parameter is null.


GetHashCode Method

GetHashCode Method
Namespaces ► Newtonsoft.Json.Linq ► JValue ► GetHashCode()()()()
Serves as a hash function for a particular type.
Declaration Syntax
C# Visual Basic Visual C++
public override int GetHashCode()
Public Overrides Function GetHashCode As Integer
public:
virtual int GetHashCode() override
Return Value
A hash code for the current Object.


GetMetaObject Method (parameter)

GetMetaObject Method (parameter)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► GetMetaObject(Expression)
Returns the DynamicMetaObject responsible for binding operations performed on this object.
Declaration Syntax
C# Visual Basic Visual C++
protected override DynamicMetaObject GetMetaObject(
    Expression parameter
)
Protected Overrides Function GetMetaObject ( _
    parameter As Expression _
) As DynamicMetaObject
protected:
virtual DynamicMetaObject^ GetMetaObject(
    Expression^ parameter
) override
Parameters
parameter (Expression)
The expression tree representation of the runtime value.
Return Value
The DynamicMetaObject to bind this object.


HasValues Property

HasValues Property
Namespaces ► Newtonsoft.Json.Linq ► JValue ► HasValues
Gets a value indicating whether this token has childen tokens.
Declaration Syntax
C# Visual Basic Visual C++
public override bool HasValues { get; }
Public Overrides ReadOnly Property HasValues As Boolean
    Get
public:
virtual property bool HasValues {
    bool get () override;
}
Value
true if this token has child values; otherwise, false.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JValue ► ToString()()()()
Members
Icon | Member | Description
 | ToString()()()() | Returns a String that represents this instance. (Overrides JToken.ToString()()()().)
 | ToString(String) | Returns a String that represents this instance.
 | ToString(IFormatProvider) | Returns a String that represents this instance.
 | ToString(String, IFormatProvider) | Returns a String that represents this instance.
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JValue ► ToString()()()()
Returns a String that represents this instance.
Declaration Syntax
C# Visual Basic Visual C++
public override string ToString()
Public Overrides Function ToString As String
public:
virtual String^ ToString() override
Return Value
A String that represents this instance.


ToString Method (formatProvider)

ToString Method (formatProvider)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► ToString(IFormatProvider)
Returns a String that represents this instance.
Declaration Syntax
C# Visual Basic Visual C++
public string ToString(
    IFormatProvider formatProvider
)
Public Function ToString ( _
    formatProvider As IFormatProvider _
) As String
public:
String^ ToString(
    IFormatProvider^ formatProvider
)
Parameters
formatProvider (IFormatProvider)
The format provider.
Return Value
A String that represents this instance.


ToString Method (format)

ToString Method (format)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► ToString(String)
Returns a String that represents this instance.
Declaration Syntax
C# Visual Basic Visual C++
public string ToString(
    string format
)
Public Function ToString ( _
    format As String _
) As String
public:
String^ ToString(
    String^ format
)
Parameters
format (String)
The format.
Return Value
A String that represents this instance.


ToString Method (format, formatProvider)

ToString Method (format, formatProvider)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► ToString(String, IFormatProvider)
Returns a String that represents this instance.
Declaration Syntax
C# Visual Basic Visual C++
public string ToString(
    string format,
    IFormatProvider formatProvider
)
Public Function ToString ( _
    format As String, _
    formatProvider As IFormatProvider _
) As String
public:
virtual String^ ToString(
    String^ format,
    IFormatProvider^ formatProvider
) sealed
Parameters
format (String)
The format.
formatProvider (IFormatProvider)
The format provider.
Return Value
A String that represents this instance.


Type Property

Type Property
Namespaces ► Newtonsoft.Json.Linq ► JValue ► Type
Gets the node type for this JToken.
Declaration Syntax
C# Visual Basic Visual C++
public override JTokenType Type { get; }
Public Overrides ReadOnly Property Type As JTokenType
    Get
public:
virtual property JTokenType Type {
    JTokenType get () override;
}
Value
The type.


Value Property

Value Property
Namespaces ► Newtonsoft.Json.Linq ► JValue ► Value
Gets or sets the underlying token value.
Declaration Syntax
C# Visual Basic Visual C++
public Object Value { get; set; }
Public Property Value As Object
    Get
    Set
public:
property Object^ Value {
    Object^ get ();
    void set (Object^ value);
}
Value
The underlying token value.


WriteTo Method (writer, converters)

WriteTo Method (writer, converters)
Namespaces ► Newtonsoft.Json.Linq ► JValue ► WriteTo(JsonWriter, array<JsonConverter>[]()[][])
Writes this token to a JsonWriter.
Declaration Syntax
C# Visual Basic Visual C++
public override void WriteTo(
    JsonWriter writer,
    params JsonConverter[] converters
)
Public Overrides Sub WriteTo ( _
    writer As JsonWriter, _
    ParamArray converters As JsonConverter() _
)
public:
virtual void WriteTo(
    JsonWriter^ writer,
    ... array<JsonConverter^>^ converters
) override
Parameters
writer (JsonWriter)
A JsonWriter into which this method will write.
converters (array< JsonConverter >[]()[][])
A collection of JsonConverter which will be used when writing the token.


Newtonsoft.Json.Linq.ComponentModel Namespace

Newtonsoft.Json.Linq.ComponentModel Namespace
Namespaces ► Newtonsoft.Json.Linq.ComponentModel
The Newtonsoft.Json.Linq.ComponentModel namespace provides classes for LINQ to JSON databinding.
Declaration Syntax
C# Visual Basic Visual C++
namespace Newtonsoft.Json.Linq.ComponentModel
Namespace Newtonsoft.Json.Linq.ComponentModel
namespace Newtonsoft.Json.Linq.ComponentModel
Types
All Types Classes
Icon | Type | Description
 | JPropertyDescriptor | Represents a view of a JProperty.


JPropertyDescriptor Class

JPropertyDescriptor Class
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor
Represents a view of a JProperty.
Declaration Syntax
C# Visual Basic Visual C++
public class JPropertyDescriptor : PropertyDescriptor
Public Class JPropertyDescriptor _
    Inherits PropertyDescriptor
public ref class JPropertyDescriptor : public PropertyDescriptor
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JPropertyDescriptor(String, Type) | Initializes a new instance of the JPropertyDescriptor class.
 | AddValueChanged(Object, EventHandler) | Enables other objects to be notified when this property changes. (Inherited from PropertyDescriptor.)
 | AttributeArray | Gets or sets an array of attributes. (Inherited from MemberDescriptor.)
 | Attributes | Gets the collection of attributes for this member. (Inherited from MemberDescriptor.)
 | CanResetValue(Object) | When overridden in a derived class, returns whether resetting an object changes its value. (Overrides PropertyDescriptor.CanResetValue(Object).)
 | Category | Gets the name of the category to which the member belongs, as specified in the CategoryAttribute. (Inherited from MemberDescriptor.)
 | ComponentType | When overridden in a derived class, gets the type of the component this property is bound to. (Overrides PropertyDescriptor.ComponentType.)
 | Converter | Gets the type converter for this property. (Inherited from PropertyDescriptor.)
 | CreateAttributeCollection()()()() | Creates a collection of attributes using the array of attributes passed to the constructor. (Inherited from MemberDescriptor.)
 | CreateInstance(Type) | Creates an instance of the specified type. (Inherited from PropertyDescriptor.)
 | Description | Gets the description of the member, as specified in the DescriptionAttribute. (Inherited from MemberDescriptor.)
 | DesignTimeOnly | Gets whether this member should be set only at design time, as specified in the DesignOnlyAttribute. (Inherited from MemberDescriptor.)
 | DisplayName | Gets the name that can be displayed in a window, such as a Properties window. (Inherited from MemberDescriptor.)
 | Equals(Object) | Compares this to another object to see if they are equivalent. (Inherited from PropertyDescriptor.)
 | FillAttributes(IList) | Adds the attributes of the PropertyDescriptor to the specified list of attributes in the parent class. (Inherited from PropertyDescriptor.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetChildProperties()()()() | Returns the default PropertyDescriptorCollection. (Inherited from PropertyDescriptor.)
 | GetChildProperties(array<Attribute>[]()[][]) | Returns a PropertyDescriptorCollection using a specified array of attributes as a filter. (Inherited from PropertyDescriptor.)
 | GetChildProperties(Object) | Returns a PropertyDescriptorCollection for a given object. (Inherited from PropertyDescriptor.)
 | GetChildProperties(Object, array<Attribute>[]()[][]) | Returns a PropertyDescriptorCollection for a given object using a specified array of attributes as a filter. (Inherited from PropertyDescriptor.)
 | GetEditor(Type) | Gets an editor of the specified type. (Inherited from PropertyDescriptor.)
 | GetHashCode()()()() | Returns the hash code for this object. (Inherited from PropertyDescriptor.)
 | GetInvocationTarget(Type, Object) | This method returns the object that should be used during invocation of members. (Inherited from PropertyDescriptor.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | GetTypeFromName(String) | Returns a type using its name. (Inherited from PropertyDescriptor.)
 | GetValue(Object) | When overridden in a derived class, gets the current value of the property on a component. (Overrides PropertyDescriptor.GetValue(Object).)
 | GetValueChangedHandler(Object) | Retrieves the current set of ValueChanged event handlers for a specific component (Inherited from PropertyDescriptor.)
 | IsBrowsable | Gets a value indicating whether the member is browsable, as specified in the BrowsableAttribute. (Inherited from MemberDescriptor.)
 | IsLocalizable | Gets a value indicating whether this property should be localized, as specified in the LocalizableAttribute. (Inherited from PropertyDescriptor.)
 | IsReadOnly | When overridden in a derived class, gets a value indicating whether this property is read-only. (Overrides PropertyDescriptor.IsReadOnly.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Name | Gets the name of the member. (Inherited from MemberDescriptor.)
 | NameHashCode | Gets the hash code for the name of the member. (Overrides MemberDescriptor.NameHashCode.)
 | OnValueChanged(Object, EventArgs) | Raises the ValueChanged event that you implemented. (Inherited from PropertyDescriptor.)
 | PropertyType | When overridden in a derived class, gets the type of the property. (Overrides PropertyDescriptor.PropertyType.)
 | RemoveValueChanged(Object, EventHandler) | Enables other objects to be notified when this property changes. (Inherited from PropertyDescriptor.)
 | ResetValue(Object) | When overridden in a derived class, resets the value for this property of the component to the default value. (Overrides PropertyDescriptor.ResetValue(Object).)
 | SerializationVisibility | Gets a value indicating whether this property should be serialized, as specified in the DesignerSerializationVisibilityAttribute. (Inherited from PropertyDescriptor.)
 | SetValue(Object, Object) | When overridden in a derived class, sets the value of the component to a different value. (Overrides PropertyDescriptor.SetValue(Object, Object).)
 | ShouldSerializeValue(Object) | When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. (Overrides PropertyDescriptor.ShouldSerializeValue(Object).)
 | SupportsChangeEvents | Gets a value indicating whether value change notifications for this property may originate from outside the property descriptor. (Inherited from PropertyDescriptor.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | MemberDescriptor
 |  | PropertyDescriptor
 |  |  | JPropertyDescriptor


JPropertyDescriptor Constructor (name, propertyType)

JPropertyDescriptor Constructor (name, propertyType)
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► JPropertyDescriptor(String, Type)
Initializes a new instance of the JPropertyDescriptor class.
Declaration Syntax
C# Visual Basic Visual C++
public JPropertyDescriptor(
    string name,
    Type propertyType
)
Public Sub New ( _
    name As String, _
    propertyType As Type _
)
public:
JPropertyDescriptor(
    String^ name,
    Type^ propertyType
)
Parameters
name (String)
The name.
propertyType (Type)
Type of the property.


CanResetValue Method (component)

CanResetValue Method (component)
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► CanResetValue(Object)
When overridden in a derived class, returns whether resetting an object changes its value.
Declaration Syntax
C# Visual Basic Visual C++
public override bool CanResetValue(
    Object component
)
Public Overrides Function CanResetValue ( _
    component As Object _
) As Boolean
public:
virtual bool CanResetValue(
    Object^ component
) override
Parameters
component (Object)
The component to test for reset capability.
Return Value
true if resetting the component changes its value; otherwise, false.


ComponentType Property

ComponentType Property
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► ComponentType
When overridden in a derived class, gets the type of the component this property is bound to.
Declaration Syntax
C# Visual Basic Visual C++
public override Type ComponentType { get; }
Public Overrides ReadOnly Property ComponentType As Type
    Get
public:
virtual property Type^ ComponentType {
    Type^ get () override;
}
Return Value
A Type that represents the type of component this property is bound to. When the GetValue(Object) or SetValue(Object, Object) methods are invoked, the object specified might be an instance of this type.


GetValue Method (component)

GetValue Method (component)
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► GetValue(Object)
When overridden in a derived class, gets the current value of the property on a component.
Declaration Syntax
C# Visual Basic Visual C++
public override Object GetValue(
    Object component
)
Public Overrides Function GetValue ( _
    component As Object _
) As Object
public:
virtual Object^ GetValue(
    Object^ component
) override
Parameters
component (Object)
The component with the property for which to retrieve the value.
Return Value
The value of a property for a given component.


IsReadOnly Property

IsReadOnly Property
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► IsReadOnly
When overridden in a derived class, gets a value indicating whether this property is read-only.
Declaration Syntax
C# Visual Basic Visual C++
public override bool IsReadOnly { get; }
Public Overrides ReadOnly Property IsReadOnly As Boolean
    Get
public:
virtual property bool IsReadOnly {
    bool get () override;
}
Return Value
true if the property is read-only; otherwise, false.


NameHashCode Property

NameHashCode Property
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► NameHashCode
Gets the hash code for the name of the member.
Declaration Syntax
C# Visual Basic Visual C++
protected override int NameHashCode { get; }
Protected Overrides ReadOnly Property NameHashCode As Integer
    Get
protected:
virtual property int NameHashCode {
    int get () override;
}
Value
Return Value
The hash code for the name of the member.


PropertyType Property

PropertyType Property
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► PropertyType
When overridden in a derived class, gets the type of the property.
Declaration Syntax
C# Visual Basic Visual C++
public override Type PropertyType { get; }
Public Overrides ReadOnly Property PropertyType As Type
    Get
public:
virtual property Type^ PropertyType {
    Type^ get () override;
}
Return Value
A Type that represents the type of the property.


ResetValue Method (component)

ResetValue Method (component)
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► ResetValue(Object)
When overridden in a derived class, resets the value for this property of the component to the default value.
Declaration Syntax
C# Visual Basic Visual C++
public override void ResetValue(
    Object component
)
Public Overrides Sub ResetValue ( _
    component As Object _
)
public:
virtual void ResetValue(
    Object^ component
) override
Parameters
component (Object)
The component with the property value that is to be reset to the default value.


SetValue Method (component, value)

SetValue Method (component, value)
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► SetValue(Object, Object)
When overridden in a derived class, sets the value of the component to a different value.
Declaration Syntax
C# Visual Basic Visual C++
public override void SetValue(
    Object component,
    Object value
)
Public Overrides Sub SetValue ( _
    component As Object, _
    value As Object _
)
public:
virtual void SetValue(
    Object^ component,
    Object^ value
) override
Parameters
component (Object)
The component with the property value that is to be set.
value (Object)
The new value.


ShouldSerializeValue Method (component)

ShouldSerializeValue Method (component)
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► ShouldSerializeValue(Object)
When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
Declaration Syntax
C# Visual Basic Visual C++
public override bool ShouldSerializeValue(
    Object component
)
Public Overrides Function ShouldSerializeValue ( _
    component As Object _
) As Boolean
public:
virtual bool ShouldSerializeValue(
    Object^ component
) override
Parameters
component (Object)
The component with the property to be examined for persistence.
Return Value
true if the property should be persisted; otherwise, false.


Newtonsoft.Json.Schema Namespace

Newtonsoft.Json.Schema Namespace
Namespaces ► Newtonsoft.Json.Schema
The Newtonsoft.Json.Schema namespace provides classes that are used to implement JSON schema.
Declaration Syntax
C# Visual Basic Visual C++
namespace Newtonsoft.Json.Schema
Namespace Newtonsoft.Json.Schema
namespace Newtonsoft.Json.Schema
Types
All Types Classes Enumerations Delegates
Icon | Type | Description
 | Extensions | Contains the JSON schema extension methods.
 | JsonSchema | An in-memory representation of a JSON Schema.
 | JsonSchemaException | Returns detailed information about the schema exception.
 | JsonSchemaGenerator | Generates a JsonSchema from a specified Type.
 | JsonSchemaResolver | Resolves JsonSchema from an id.
 | JsonSchemaType | The value types allowed by the JsonSchema.
 | UndefinedSchemaIdHandling | Specifies undefined schema Id handling options for the JsonSchemaGenerator.
 | ValidationEventArgs | Returns detailed information related to the ValidationEventHandler.
 | ValidationEventHandler | Represents the callback method that will handle JSON schema validation events and the ValidationEventArgs.


Extensions Class

Extensions Class
Namespaces ► Newtonsoft.Json.Schema ► Extensions
Contains the JSON schema extension methods.
Declaration Syntax
C# Visual Basic Visual C++
public static class Extensions
<ExtensionAttribute> _
Public NotInheritable Class Extensions
[ExtensionAttribute]
public ref class Extensions abstract sealed
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | IsValid(JToken, JsonSchema) | Determines whether the JToken is valid.
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.
Inheritance Hierarchy
Object
Extensions


IsValid Method (source, schema)

IsValid Method (source, schema)
Namespaces ► Newtonsoft.Json.Schema ► Extensions ► IsValid(JToken, JsonSchema)
Determines whether the JToken is valid.
Declaration Syntax
C# Visual Basic Visual C++
public static bool IsValid(
    this JToken source,
    JsonSchema schema
)
<ExtensionAttribute> _
Public Shared Function IsValid ( _
    source As JToken, _
    schema As JsonSchema _
) As Boolean
[ExtensionAttribute]
public:
static bool IsValid(
    JToken^ source,
    JsonSchema^ schema
)
Parameters
source (JToken)
The source JToken to test.
schema (JsonSchema)
The schema to test with.
Return Value
true if the specified JToken is valid; otherwise, false.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type JToken. When you use instance method syntax to call this method, omit the first parameter.


Validate Method

Validate Method
Namespaces ► Newtonsoft.Json.Schema ► Extensions ► Validate()()()()
Members
Icon | Member | Description
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.


Validate Method (source, schema)

Validate Method (source, schema)
Namespaces ► Newtonsoft.Json.Schema ► Extensions ► Validate(JToken, JsonSchema)
Validates the specified JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static void Validate(
    this JToken source,
    JsonSchema schema
)
<ExtensionAttribute> _
Public Shared Sub Validate ( _
    source As JToken, _
    schema As JsonSchema _
)
[ExtensionAttribute]
public:
static void Validate(
    JToken^ source,
    JsonSchema^ schema
)
Parameters
source (JToken)
The source JToken to test.
schema (JsonSchema)
The schema to test with.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type JToken. When you use instance method syntax to call this method, omit the first parameter.


Validate Method (source, schema, validationEventHandler)

Validate Method (source, schema, validationEventHandler)
Namespaces ► Newtonsoft.Json.Schema ► Extensions ► Validate(JToken, JsonSchema, ValidationEventHandler)
Validates the specified JToken.
Declaration Syntax
C# Visual Basic Visual C++
public static void Validate(
    this JToken source,
    JsonSchema schema,
    ValidationEventHandler validationEventHandler
)
<ExtensionAttribute> _
Public Shared Sub Validate ( _
    source As JToken, _
    schema As JsonSchema, _
    validationEventHandler As ValidationEventHandler _
)
[ExtensionAttribute]
public:
static void Validate(
    JToken^ source,
    JsonSchema^ schema,
    ValidationEventHandler^ validationEventHandler
)
Parameters
source (JToken)
The source JToken to test.
schema (JsonSchema)
The schema to test with.
validationEventHandler (ValidationEventHandler)
The validation event handler.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type JToken. When you use instance method syntax to call this method, omit the first parameter.


JsonSchema Class

JsonSchema Class
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema
An in-memory representation of a JSON Schema.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonSchema
Public Class JsonSchema
public ref class JsonSchema
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonSchema()()()() | Initializes a new instance of the JsonSchema class.
 | AdditionalProperties | Gets or sets the JsonSchema of additional properties.
 | AllowAdditionalProperties | Gets or sets a value indicating whether additional properties are allowed.
 | Default | Gets or sets the default value.
 | Description | Gets or sets the description of the object.
 | Disallow | Gets or sets disallowed types.
 | DivisibleBy | Gets or sets a number that the value should be divisble by.
 | Enum | Gets or sets the a collection of valid enum values allowed.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | ExclusiveMaximum | Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute.
 | ExclusiveMinimum | Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute.
 | Extends | Gets or sets the extend JsonSchema.
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | Format | Gets or sets the format.
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Hidden | Gets or sets whether the object is visible to users.
 | Id | Gets or sets the id.
 | Identity | Gets or sets the identity.
 | Items | Gets or sets the JsonSchema of items.
 | Maximum | Gets or sets the maximum.
 | MaximumItems | Gets or sets the maximum number of items.
 | MaximumLength | Gets or sets the maximum length.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Minimum | Gets or sets the minimum.
 | MinimumItems | Gets or sets the minimum number of items.
 | MinimumLength | Gets or sets the minimum length.
 | Options | Gets or sets a collection of options.
 | Parse(String) | Load a JsonSchema from a string that contains schema JSON.
 | Parse(String, JsonSchemaResolver) | Parses the specified json.
 | Pattern | Gets or sets the pattern.
 | PatternProperties | Gets or sets the pattern properties.
 | Properties | Gets or sets the JsonSchema of properties.
 | Read(JsonReader) | Reads a JsonSchema from the specified JsonReader.
 | Read(JsonReader, JsonSchemaResolver) | Reads a JsonSchema from the specified JsonReader.
 | ReadOnly | Gets or sets whether the object is read only.
 | Required | Gets or sets whether the object is required.
 | Requires | Gets or sets the required property if this property is present.
 | Title | Gets or sets the title.
 | ToString()()()() | Returns a String that represents the current Object. (Overrides Object.ToString()()()().)
 | Transient | Gets or sets whether the object is transient.
 | Type | Gets or sets the types of values allowed by the object.
 | WriteTo(JsonWriter) | Writes this schema to a JsonWriter.
 | WriteTo(JsonWriter, JsonSchemaResolver) | Writes this schema to a JsonWriter using the specified JsonSchemaResolver.
Inheritance Hierarchy
Object
JsonSchema


JsonSchema Constructor

JsonSchema Constructor
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► JsonSchema()()()()
Initializes a new instance of the JsonSchema class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchema()
Public Sub New
public:
JsonSchema()


AdditionalProperties Property

AdditionalProperties Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► AdditionalProperties
Gets or sets the JsonSchema of additional properties.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchema AdditionalProperties { get; set; }
Public Property AdditionalProperties As JsonSchema
    Get
    Set
public:
property JsonSchema^ AdditionalProperties {
    JsonSchema^ get ();
    void set (JsonSchema^ value);
}
Value
The JsonSchema of additional properties.


AllowAdditionalProperties Property

AllowAdditionalProperties Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► AllowAdditionalProperties
Gets or sets a value indicating whether additional properties are allowed.
Declaration Syntax
C# Visual Basic Visual C++
public bool AllowAdditionalProperties { get; set; }
Public Property AllowAdditionalProperties As Boolean
    Get
    Set
public:
property bool AllowAdditionalProperties {
    bool get ();
    void set (bool value);
}
Value
true if additional properties are allowed; otherwise, false.


Default Property

Default Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Default
Gets or sets the default value.
Declaration Syntax
C# Visual Basic Visual C++
public JToken Default { get; set; }
Public Property Default As JToken
    Get
    Set
public:
property JToken^ Default {
    JToken^ get ();
    void set (JToken^ value);
}
Value
The default value.


Description Property

Description Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Description
Gets or sets the description of the object.
Declaration Syntax
C# Visual Basic Visual C++
public string Description { get; set; }
Public Property Description As String
    Get
    Set
public:
property String^ Description {
    String^ get ();
    void set (String^ value);
}


Disallow Property

Disallow Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Disallow
Gets or sets disallowed types.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<JsonSchemaType> Disallow { get; set; }
Public Property Disallow As Nullable(Of JsonSchemaType)
    Get
    Set
public:
property Nullable<JsonSchemaType> Disallow {
    Nullable<JsonSchemaType> get ();
    void set (Nullable<JsonSchemaType> value);
}
Value
The disallow types.


DivisibleBy Property

DivisibleBy Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► DivisibleBy
Gets or sets a number that the value should be divisble by.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<double> DivisibleBy { get; set; }
Public Property DivisibleBy As Nullable(Of Double)
    Get
    Set
public:
property Nullable<double> DivisibleBy {
    Nullable<double> get ();
    void set (Nullable<double> value);
}
Value
A number that the value should be divisble by.


Enum Property

Enum Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Enum
Gets or sets the a collection of valid enum values allowed.
Declaration Syntax
C# Visual Basic Visual C++
public IList<JToken> Enum { get; set; }
Public Property Enum As IList(Of JToken)
    Get
    Set
public:
property IList<JToken^>^ Enum {
    IList<JToken^>^ get ();
    void set (IList<JToken^>^ value);
}
Value
A collection of valid enum values allowed.


ExclusiveMaximum Property

ExclusiveMaximum Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► ExclusiveMaximum
Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<bool> ExclusiveMaximum { get; set; }
Public Property ExclusiveMaximum As Nullable(Of Boolean)
    Get
    Set
public:
property Nullable<bool> ExclusiveMaximum {
    Nullable<bool> get ();
    void set (Nullable<bool> value);
}
Value
A flag indicating whether the value can not equal the number defined by the "maximum" attribute.


ExclusiveMinimum Property

ExclusiveMinimum Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► ExclusiveMinimum
Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<bool> ExclusiveMinimum { get; set; }
Public Property ExclusiveMinimum As Nullable(Of Boolean)
    Get
    Set
public:
property Nullable<bool> ExclusiveMinimum {
    Nullable<bool> get ();
    void set (Nullable<bool> value);
}
Value
A flag indicating whether the value can not equal the number defined by the "minimum" attribute.


Extends Property

Extends Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Extends
Gets or sets the extend JsonSchema.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchema Extends { get; set; }
Public Property Extends As JsonSchema
    Get
    Set
public:
property JsonSchema^ Extends {
    JsonSchema^ get ();
    void set (JsonSchema^ value);
}
Value
The extended JsonSchema.


Format Property

Format Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Format
Gets or sets the format.
Declaration Syntax
C# Visual Basic Visual C++
public string Format { get; set; }
Public Property Format As String
    Get
    Set
public:
property String^ Format {
    String^ get ();
    void set (String^ value);
}
Value
The format.


Hidden Property

Hidden Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Hidden
Gets or sets whether the object is visible to users.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<bool> Hidden { get; set; }
Public Property Hidden As Nullable(Of Boolean)
    Get
    Set
public:
property Nullable<bool> Hidden {
    Nullable<bool> get ();
    void set (Nullable<bool> value);
}


Id Property

Id Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Id
Gets or sets the id.
Declaration Syntax
C# Visual Basic Visual C++
public string Id { get; set; }
Public Property Id As String
    Get
    Set
public:
property String^ Id {
    String^ get ();
    void set (String^ value);
}


Identity Property

Identity Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Identity
Gets or sets the identity.
Declaration Syntax
C# Visual Basic Visual C++
public IList<string> Identity { get; set; }
Public Property Identity As IList(Of String)
    Get
    Set
public:
property IList<String^>^ Identity {
    IList<String^>^ get ();
    void set (IList<String^>^ value);
}
Value
The identity.


Items Property

Items Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Items
Gets or sets the JsonSchema of items.
Declaration Syntax
C# Visual Basic Visual C++
public IList<JsonSchema> Items { get; set; }
Public Property Items As IList(Of JsonSchema)
    Get
    Set
public:
property IList<JsonSchema^>^ Items {
    IList<JsonSchema^>^ get ();
    void set (IList<JsonSchema^>^ value);
}
Value
The JsonSchema of items.


Maximum Property

Maximum Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Maximum
Gets or sets the maximum.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<double> Maximum { get; set; }
Public Property Maximum As Nullable(Of Double)
    Get
    Set
public:
property Nullable<double> Maximum {
    Nullable<double> get ();
    void set (Nullable<double> value);
}
Value
The maximum.


MaximumItems Property

MaximumItems Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► MaximumItems
Gets or sets the maximum number of items.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<int> MaximumItems { get; set; }
Public Property MaximumItems As Nullable(Of Integer)
    Get
    Set
public:
property Nullable<int> MaximumItems {
    Nullable<int> get ();
    void set (Nullable<int> value);
}
Value
The maximum number of items.


MaximumLength Property

MaximumLength Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► MaximumLength
Gets or sets the maximum length.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<int> MaximumLength { get; set; }
Public Property MaximumLength As Nullable(Of Integer)
    Get
    Set
public:
property Nullable<int> MaximumLength {
    Nullable<int> get ();
    void set (Nullable<int> value);
}
Value
The maximum length.


Minimum Property

Minimum Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Minimum
Gets or sets the minimum.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<double> Minimum { get; set; }
Public Property Minimum As Nullable(Of Double)
    Get
    Set
public:
property Nullable<double> Minimum {
    Nullable<double> get ();
    void set (Nullable<double> value);
}
Value
The minimum.


MinimumItems Property

MinimumItems Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► MinimumItems
Gets or sets the minimum number of items.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<int> MinimumItems { get; set; }
Public Property MinimumItems As Nullable(Of Integer)
    Get
    Set
public:
property Nullable<int> MinimumItems {
    Nullable<int> get ();
    void set (Nullable<int> value);
}
Value
The minimum number of items.


MinimumLength Property

MinimumLength Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► MinimumLength
Gets or sets the minimum length.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<int> MinimumLength { get; set; }
Public Property MinimumLength As Nullable(Of Integer)
    Get
    Set
public:
property Nullable<int> MinimumLength {
    Nullable<int> get ();
    void set (Nullable<int> value);
}
Value
The minimum length.


Options Property

Options Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Options
Gets or sets a collection of options.
Declaration Syntax
C# Visual Basic Visual C++
public IDictionary<JToken, string> Options { get; set; }
Public Property Options As IDictionary(Of JToken, String)
    Get
    Set
public:
property IDictionary<JToken^, String^>^ Options {
    IDictionary<JToken^, String^>^ get ();
    void set (IDictionary<JToken^, String^>^ value);
}
Value
A collection of options.


Parse Method

Parse Method
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Parse()()()()
Members
Icon | Member | Description
 | Parse(String) | Load a JsonSchema from a string that contains schema JSON.
 | Parse(String, JsonSchemaResolver) | Parses the specified json.


Parse Method (json)

Parse Method (json)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Parse(String)
Load a JsonSchema from a string that contains schema JSON.
Declaration Syntax
C# Visual Basic Visual C++
public static JsonSchema Parse(
    string json
)
Public Shared Function Parse ( _
    json As String _
) As JsonSchema
public:
static JsonSchema^ Parse(
    String^ json
)
Parameters
json (String)
A String that contains JSON.
Return Value
A JsonSchema populated from the string that contains JSON.


Parse Method (json, resolver)

Parse Method (json, resolver)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Parse(String, JsonSchemaResolver)
Parses the specified json.
Declaration Syntax
C# Visual Basic Visual C++
public static JsonSchema Parse(
    string json,
    JsonSchemaResolver resolver
)
Public Shared Function Parse ( _
    json As String, _
    resolver As JsonSchemaResolver _
) As JsonSchema
public:
static JsonSchema^ Parse(
    String^ json,
    JsonSchemaResolver^ resolver
)
Parameters
json (String)
The json.
resolver (JsonSchemaResolver)
The resolver.
Return Value
A JsonSchema populated from the string that contains JSON.


Pattern Property

Pattern Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Pattern
Gets or sets the pattern.
Declaration Syntax
C# Visual Basic Visual C++
public string Pattern { get; set; }
Public Property Pattern As String
    Get
    Set
public:
property String^ Pattern {
    String^ get ();
    void set (String^ value);
}
Value
The pattern.


PatternProperties Property

PatternProperties Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► PatternProperties
Gets or sets the pattern properties.
Declaration Syntax
C# Visual Basic Visual C++
public IDictionary<string, JsonSchema> PatternProperties { get; set; }
Public Property PatternProperties As IDictionary(Of String, JsonSchema)
    Get
    Set
public:
property IDictionary<String^, JsonSchema^>^ PatternProperties {
    IDictionary<String^, JsonSchema^>^ get ();
    void set (IDictionary<String^, JsonSchema^>^ value);
}
Value
The pattern properties.


Properties Property

Properties Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Properties
Gets or sets the JsonSchema of properties.
Declaration Syntax
C# Visual Basic Visual C++
public IDictionary<string, JsonSchema> Properties { get; set; }
Public Property Properties As IDictionary(Of String, JsonSchema)
    Get
    Set
public:
property IDictionary<String^, JsonSchema^>^ Properties {
    IDictionary<String^, JsonSchema^>^ get ();
    void set (IDictionary<String^, JsonSchema^>^ value);
}
Value
The JsonSchema of properties.


Read Method

Read Method
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Read()()()()
Members
Icon | Member | Description
 | Read(JsonReader) | Reads a JsonSchema from the specified JsonReader.
 | Read(JsonReader, JsonSchemaResolver) | Reads a JsonSchema from the specified JsonReader.


Read Method (reader)

Read Method (reader)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Read(JsonReader)
Reads a JsonSchema from the specified JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public static JsonSchema Read(
    JsonReader reader
)
Public Shared Function Read ( _
    reader As JsonReader _
) As JsonSchema
public:
static JsonSchema^ Read(
    JsonReader^ reader
)
Parameters
reader (JsonReader)
The JsonReader containing the JSON Schema to read.
Return Value
The JsonSchema object representing the JSON Schema.


Read Method (reader, resolver)

Read Method (reader, resolver)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Read(JsonReader, JsonSchemaResolver)
Reads a JsonSchema from the specified JsonReader.
Declaration Syntax
C# Visual Basic Visual C++
public static JsonSchema Read(
    JsonReader reader,
    JsonSchemaResolver resolver
)
Public Shared Function Read ( _
    reader As JsonReader, _
    resolver As JsonSchemaResolver _
) As JsonSchema
public:
static JsonSchema^ Read(
    JsonReader^ reader,
    JsonSchemaResolver^ resolver
)
Parameters
reader (JsonReader)
The JsonReader containing the JSON Schema to read.
resolver (JsonSchemaResolver)
The JsonSchemaResolver to use when resolving schema references.
Return Value
The JsonSchema object representing the JSON Schema.


ReadOnly Property

ReadOnly Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► ReadOnly
Gets or sets whether the object is read only.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<bool> ReadOnly { get; set; }
Public Property ReadOnly As Nullable(Of Boolean)
    Get
    Set
public:
property Nullable<bool> ReadOnly {
    Nullable<bool> get ();
    void set (Nullable<bool> value);
}


Required Property

Required Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Required
Gets or sets whether the object is required.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<bool> Required { get; set; }
Public Property Required As Nullable(Of Boolean)
    Get
    Set
public:
property Nullable<bool> Required {
    Nullable<bool> get ();
    void set (Nullable<bool> value);
}


Requires Property

Requires Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Requires
Gets or sets the required property if this property is present.
Declaration Syntax
C# Visual Basic Visual C++
public string Requires { get; set; }
Public Property Requires As String
    Get
    Set
public:
property String^ Requires {
    String^ get ();
    void set (String^ value);
}
Value
The required property if this property is present.


Title Property

Title Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Title
Gets or sets the title.
Declaration Syntax
C# Visual Basic Visual C++
public string Title { get; set; }
Public Property Title As String
    Get
    Set
public:
property String^ Title {
    String^ get ();
    void set (String^ value);
}


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► ToString()()()()
Returns a String that represents the current Object.
Declaration Syntax
C# Visual Basic Visual C++
public override string ToString()
Public Overrides Function ToString As String
public:
virtual String^ ToString() override
Return Value
A String that represents the current Object.


Transient Property

Transient Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Transient
Gets or sets whether the object is transient.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<bool> Transient { get; set; }
Public Property Transient As Nullable(Of Boolean)
    Get
    Set
public:
property Nullable<bool> Transient {
    Nullable<bool> get ();
    void set (Nullable<bool> value);
}


Type Property

Type Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► Type
Gets or sets the types of values allowed by the object.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<JsonSchemaType> Type { get; set; }
Public Property Type As Nullable(Of JsonSchemaType)
    Get
    Set
public:
property Nullable<JsonSchemaType> Type {
    Nullable<JsonSchemaType> get ();
    void set (Nullable<JsonSchemaType> value);
}
Value
The type.


WriteTo Method

WriteTo Method
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► WriteTo()()()()
Members
Icon | Member | Description
 | WriteTo(JsonWriter) | Writes this schema to a JsonWriter.
 | WriteTo(JsonWriter, JsonSchemaResolver) | Writes this schema to a JsonWriter using the specified JsonSchemaResolver.


WriteTo Method (writer)

WriteTo Method (writer)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► WriteTo(JsonWriter)
Writes this schema to a JsonWriter.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteTo(
    JsonWriter writer
)
Public Sub WriteTo ( _
    writer As JsonWriter _
)
public:
void WriteTo(
    JsonWriter^ writer
)
Parameters
writer (JsonWriter)
A JsonWriter into which this method will write.


WriteTo Method (writer, resolver)

WriteTo Method (writer, resolver)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchema ► WriteTo(JsonWriter, JsonSchemaResolver)
Writes this schema to a JsonWriter using the specified JsonSchemaResolver.
Declaration Syntax
C# Visual Basic Visual C++
public void WriteTo(
    JsonWriter writer,
    JsonSchemaResolver resolver
)
Public Sub WriteTo ( _
    writer As JsonWriter, _
    resolver As JsonSchemaResolver _
)
public:
void WriteTo(
    JsonWriter^ writer,
    JsonSchemaResolver^ resolver
)
Parameters
writer (JsonWriter)
A JsonWriter into which this method will write.
resolver (JsonSchemaResolver)
The resolver used.


JsonSchemaException Class

JsonSchemaException Class
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaException
Returns detailed information about the schema exception.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonSchemaException : Exception
Public Class JsonSchemaException _
    Inherits Exception
public ref class JsonSchemaException : public Exception
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonSchemaException()()()() | Initializes a new instance of the JsonSchemaException class.
 | JsonSchemaException(String) | Initializes a new instance of the JsonSchemaException class with a specified error message.
 | JsonSchemaException(String, Exception) | Initializes a new instance of the JsonSchemaException class with a specified error message and a reference to the inner exception that is the cause of this exception.
 | Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetBaseException()()()() | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetObjectData(SerializationInfo, StreamingContext) | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
 | GetType()()()() | Gets the runtime type of the current instance. (Inherited from Exception.)
 | HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
 | HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
 | InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
 | LineNumber | Gets the line number indicating where the error occurred.
 | LinePosition | Gets the line position indicating where the error occurred.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Message | Gets a message that describes the current exception. (Inherited from Exception.)
 | Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
 | StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.)
 | TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)
 | ToString()()()() | Creates and returns a string representation of the current exception. (Inherited from Exception.)
Inheritance Hierarchy
Object
 | Exception
 |  | JsonSchemaException


JsonSchemaException Constructor

JsonSchemaException Constructor
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaException ► JsonSchemaException()()()()
Members
Icon | Member | Description
 | JsonSchemaException()()()() | Initializes a new instance of the JsonSchemaException class.
 | JsonSchemaException(String) | Initializes a new instance of the JsonSchemaException class with a specified error message.
 | JsonSchemaException(String, Exception) | Initializes a new instance of the JsonSchemaException class with a specified error message and a reference to the inner exception that is the cause of this exception.


JsonSchemaException Constructor

JsonSchemaException Constructor
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaException ► JsonSchemaException()()()()
Initializes a new instance of the JsonSchemaException class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchemaException()
Public Sub New
public:
JsonSchemaException()


JsonSchemaException Constructor (message)

JsonSchemaException Constructor (message)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaException ► JsonSchemaException(String)
Initializes a new instance of the JsonSchemaException class with a specified error message.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchemaException(
    string message
)
Public Sub New ( _
    message As String _
)
public:
JsonSchemaException(
    String^ message
)
Parameters
message (String)
The error message that explains the reason for the exception.


JsonSchemaException Constructor (message, innerException)

JsonSchemaException Constructor (message, innerException)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaException ► JsonSchemaException(String, Exception)
Initializes a new instance of the JsonSchemaException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchemaException(
    string message,
    Exception innerException
)
Public Sub New ( _
    message As String, _
    innerException As Exception _
)
public:
JsonSchemaException(
    String^ message,
    Exception^ innerException
)
Parameters
message (String)
The error message that explains the reason for the exception.
innerException (Exception)
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.


LineNumber Property

LineNumber Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaException ► LineNumber
Gets the line number indicating where the error occurred.
Declaration Syntax
C# Visual Basic Visual C++
public int LineNumber { get; private set; }
Public Property LineNumber As Integer
    Get
    Private Set
public:
property int LineNumber {
    int get ();
    private: void set (int value);
}
Value
The line number indicating where the error occurred.


LinePosition Property

LinePosition Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaException ► LinePosition
Gets the line position indicating where the error occurred.
Declaration Syntax
C# Visual Basic Visual C++
public int LinePosition { get; private set; }
Public Property LinePosition As Integer
    Get
    Private Set
public:
property int LinePosition {
    int get ();
    private: void set (int value);
}
Value
The line position indicating where the error occurred.


JsonSchemaGenerator Class

JsonSchemaGenerator Class
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator
Generates a JsonSchema from a specified Type.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonSchemaGenerator
Public Class JsonSchemaGenerator
public ref class JsonSchemaGenerator
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonSchemaGenerator()()()() | Initializes a new instance of the JsonSchemaGenerator class
 | ContractResolver | Gets or sets the contract resolver.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | Generate(Type) | Generate a JsonSchema from the specified type.
 | Generate(Type, JsonSchemaResolver) | Generate a JsonSchema from the specified type.
 | Generate(Type, Boolean) | Generate a JsonSchema from the specified type.
 | Generate(Type, JsonSchemaResolver, Boolean) | Generate a JsonSchema from the specified type.
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UndefinedSchemaIdHandling | Gets or sets how undefined schemas are handled by the serializer.
Inheritance Hierarchy
Object
JsonSchemaGenerator


JsonSchemaGenerator Constructor

JsonSchemaGenerator Constructor
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator ► JsonSchemaGenerator()()()()
Initializes a new instance of the JsonSchemaGenerator class
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchemaGenerator()
Public Sub New
public:
JsonSchemaGenerator()


ContractResolver Property

ContractResolver Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator ► ContractResolver
Gets or sets the contract resolver.
Declaration Syntax
C# Visual Basic Visual C++
public IContractResolver ContractResolver { get; set; }
Public Property ContractResolver As IContractResolver
    Get
    Set
public:
property IContractResolver^ ContractResolver {
    IContractResolver^ get ();
    void set (IContractResolver^ value);
}
Value
The contract resolver.


Generate Method

Generate Method
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator ► Generate()()()()
Members
Icon | Member | Description
 | Generate(Type) | Generate a JsonSchema from the specified type.
 | Generate(Type, JsonSchemaResolver) | Generate a JsonSchema from the specified type.
 | Generate(Type, Boolean) | Generate a JsonSchema from the specified type.
 | Generate(Type, JsonSchemaResolver, Boolean) | Generate a JsonSchema from the specified type.


Generate Method (type)

Generate Method (type)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator ► Generate(Type)
Generate a JsonSchema from the specified type.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchema Generate(
    Type type
)
Public Function Generate ( _
    type As Type _
) As JsonSchema
public:
JsonSchema^ Generate(
    Type^ type
)
Parameters
type (Type)
The type to generate a JsonSchema from.
Return Value
A JsonSchema generated from the specified type.


Generate Method (type, resolver)

Generate Method (type, resolver)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator ► Generate(Type, JsonSchemaResolver)
Generate a JsonSchema from the specified type.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchema Generate(
    Type type,
    JsonSchemaResolver resolver
)
Public Function Generate ( _
    type As Type, _
    resolver As JsonSchemaResolver _
) As JsonSchema
public:
JsonSchema^ Generate(
    Type^ type,
    JsonSchemaResolver^ resolver
)
Parameters
type (Type)
The type to generate a JsonSchema from.
resolver (JsonSchemaResolver)
The JsonSchemaResolver used to resolve schema references.
Return Value
A JsonSchema generated from the specified type.


Generate Method (type, resolver, rootSchemaNullable)

Generate Method (type, resolver, rootSchemaNullable)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator ► Generate(Type, JsonSchemaResolver, Boolean)
Generate a JsonSchema from the specified type.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchema Generate(
    Type type,
    JsonSchemaResolver resolver,
    bool rootSchemaNullable
)
Public Function Generate ( _
    type As Type, _
    resolver As JsonSchemaResolver, _
    rootSchemaNullable As Boolean _
) As JsonSchema
public:
JsonSchema^ Generate(
    Type^ type,
    JsonSchemaResolver^ resolver,
    bool rootSchemaNullable
)
Parameters
type (Type)
The type to generate a JsonSchema from.
resolver (JsonSchemaResolver)
The JsonSchemaResolver used to resolve schema references.
rootSchemaNullable (Boolean)
Specify whether the generated root JsonSchema will be nullable.
Return Value
A JsonSchema generated from the specified type.


Generate Method (type, rootSchemaNullable)

Generate Method (type, rootSchemaNullable)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator ► Generate(Type, Boolean)
Generate a JsonSchema from the specified type.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchema Generate(
    Type type,
    bool rootSchemaNullable
)
Public Function Generate ( _
    type As Type, _
    rootSchemaNullable As Boolean _
) As JsonSchema
public:
JsonSchema^ Generate(
    Type^ type,
    bool rootSchemaNullable
)
Parameters
type (Type)
The type to generate a JsonSchema from.
rootSchemaNullable (Boolean)
Specify whether the generated root JsonSchema will be nullable.
Return Value
A JsonSchema generated from the specified type.


UndefinedSchemaIdHandling Property

UndefinedSchemaIdHandling Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaGenerator ► UndefinedSchemaIdHandling
Gets or sets how undefined schemas are handled by the serializer.
Declaration Syntax
C# Visual Basic Visual C++
public UndefinedSchemaIdHandling UndefinedSchemaIdHandling { get; set; }
Public Property UndefinedSchemaIdHandling As UndefinedSchemaIdHandling
    Get
    Set
public:
property UndefinedSchemaIdHandling UndefinedSchemaIdHandling {
    UndefinedSchemaIdHandling get ();
    void set (UndefinedSchemaIdHandling value);
}


JsonSchemaResolver Class

JsonSchemaResolver Class
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaResolver
Resolves JsonSchema from an id.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonSchemaResolver
Public Class JsonSchemaResolver
public ref class JsonSchemaResolver
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonSchemaResolver()()()() | Initializes a new instance of the JsonSchemaResolver class.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSchema(String) | Gets a JsonSchema for the specified id.
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | LoadedSchemas | Gets or sets the loaded schemas.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
JsonSchemaResolver


JsonSchemaResolver Constructor

JsonSchemaResolver Constructor
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaResolver ► JsonSchemaResolver()()()()
Initializes a new instance of the JsonSchemaResolver class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchemaResolver()
Public Sub New
public:
JsonSchemaResolver()


GetSchema Method (id)

GetSchema Method (id)
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaResolver ► GetSchema(String)
Gets a JsonSchema for the specified id.
Declaration Syntax
C# Visual Basic Visual C++
public virtual JsonSchema GetSchema(
    string id
)
Public Overridable Function GetSchema ( _
    id As String _
) As JsonSchema
public:
virtual JsonSchema^ GetSchema(
    String^ id
)
Parameters
id (String)
The id.
Return Value
A JsonSchema for the specified id.


LoadedSchemas Property

LoadedSchemas Property
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaResolver ► LoadedSchemas
Gets or sets the loaded schemas.
Declaration Syntax
C# Visual Basic Visual C++
public IList<JsonSchema> LoadedSchemas { get; protected set; }
Public Property LoadedSchemas As IList(Of JsonSchema)
    Get
    Protected Set
public:
property IList<JsonSchema^>^ LoadedSchemas {
    IList<JsonSchema^>^ get ();
    protected: void set (IList<JsonSchema^>^ value);
}
Value
The loaded schemas.


JsonSchemaType Enumeration

JsonSchemaType Enumeration
Namespaces ► Newtonsoft.Json.Schema ► JsonSchemaType
The value types allowed by the JsonSchema.
Declaration Syntax
C# Visual Basic Visual C++
[FlagsAttribute]
public enum JsonSchemaType
<FlagsAttribute> _
Public Enumeration JsonSchemaType
[FlagsAttribute]
public enum class JsonSchemaType
Members
Member | Description
None | No type specified.
String | String type.
Float | Float type.
Integer | Integer type.
Boolean | Boolean type.
Object | Object type.
Array | Array type.
Null | Null type.
Any | Any type.


UndefinedSchemaIdHandling Enumeration

UndefinedSchemaIdHandling Enumeration
Namespaces ► Newtonsoft.Json.Schema ► UndefinedSchemaIdHandling
Specifies undefined schema Id handling options for the JsonSchemaGenerator.
Declaration Syntax
C# Visual Basic Visual C++
public enum UndefinedSchemaIdHandling
Public Enumeration UndefinedSchemaIdHandling
public enum class UndefinedSchemaIdHandling
Members
Member | Description
None | Do not infer a schema Id.
UseTypeName | Use the .NET type name as the schema Id.
UseAssemblyQualifiedName | Use the assembly qualified .NET type name as the schema Id.


ValidationEventArgs Class

ValidationEventArgs Class
Namespaces ► Newtonsoft.Json.Schema ► ValidationEventArgs
Returns detailed information related to the ValidationEventHandler.
Declaration Syntax
C# Visual Basic Visual C++
public class ValidationEventArgs : EventArgs
Public Class ValidationEventArgs _
    Inherits EventArgs
public ref class ValidationEventArgs : public EventArgs
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Exception | Gets the JsonSchemaException associated with the validation event.
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Message | Gets the text description corresponding to the validation event.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | EventArgs
 |  | ValidationEventArgs


Exception Property

Exception Property
Namespaces ► Newtonsoft.Json.Schema ► ValidationEventArgs ► Exception
Gets the JsonSchemaException associated with the validation event.
Declaration Syntax
C# Visual Basic Visual C++
public JsonSchemaException Exception { get; }
Public ReadOnly Property Exception As JsonSchemaException
    Get
public:
property JsonSchemaException^ Exception {
    JsonSchemaException^ get ();
}
Value
The JsonSchemaException associated with the validation event.


Message Property

Message Property
Namespaces ► Newtonsoft.Json.Schema ► ValidationEventArgs ► Message
Gets the text description corresponding to the validation event.
Declaration Syntax
C# Visual Basic Visual C++
public string Message { get; }
Public ReadOnly Property Message As String
    Get
public:
property String^ Message {
    String^ get ();
}
Value
The text description.


ValidationEventHandler Delegate

ValidationEventHandler Delegate
Namespaces ► Newtonsoft.Json.Schema ► ValidationEventHandler
Represents the callback method that will handle JSON schema validation events and the ValidationEventArgs.
Declaration Syntax
C# Visual Basic Visual C++
public delegate void ValidationEventHandler(
    Object sender,
    ValidationEventArgs e
)
Public Delegate Sub ValidationEventHandler ( _
    sender As Object, _
    e As ValidationEventArgs _
)
public delegate void ValidationEventHandler(
    Object^ sender,
    ValidationEventArgs^ e
)
Parameters
sender (Object)
e (ValidationEventArgs)


Newtonsoft.Json.Serialization Namespace

Newtonsoft.Json.Serialization Namespace
Namespaces ► Newtonsoft.Json.Serialization
The Newtonsoft.Json.Linq namespace provides classes that are used when serializing and deserializing JSON.
Declaration Syntax
C# Visual Basic Visual C++
namespace Newtonsoft.Json.Serialization
Namespace Newtonsoft.Json.Serialization
namespace Newtonsoft.Json.Serialization
Types
All Types Classes Interfaces Delegates
Icon | Type | Description
 | CamelCasePropertyNamesContractResolver | Resolves member mappings for a type, camel casing property names.
 | DefaultContractResolver | Used by JsonSerializer to resolves a JsonContract for a given Type.
 | DefaultSerializationBinder | The default serialization binder used when resolving and loading classes from type names.
 | DynamicValueProvider | Get and set values for a MemberInfo using dynamic methods.
 | ErrorContext | Provides information surrounding an error.
 | ErrorEventArgs | Provides data for the Error event.
 | IContractResolver | Used by JsonSerializer to resolves a JsonContract for a given Type.
 | IReferenceResolver | Used to resolve references when serializing and deserializing JSON by the JsonSerializer.
 | IValueProvider | Provides methods to get and set values.
 | JsonArrayContract | Contract details for a Type used by the JsonSerializer.
 | JsonContract | Contract details for a Type used by the JsonSerializer.
 | JsonDictionaryContract | Contract details for a Type used by the JsonSerializer.
 | JsonDynamicContract | Contract details for a Type used by the JsonSerializer.
 | JsonISerializableContract | Contract details for a Type used by the JsonSerializer.
 | JsonLinqContract | Contract details for a Type used by the JsonSerializer.
 | JsonObjectContract | Contract details for a Type used by the JsonSerializer.
 | JsonPrimitiveContract | Contract details for a Type used by the JsonSerializer.
 | JsonProperty | Maps a JSON property to a .NET member.
 | JsonPropertyCollection | A collection of JsonProperty objects.
 | JsonStringContract | Contract details for a Type used by the JsonSerializer.
 | ObjectConstructor<(Of <(<'T>)>)> | Represents a method that constructs an object.
 | OnErrorAttribute | When applied to a method, specifies that the method is called when an error occurs serializing an object.
 | ReflectionValueProvider | Get and set values for a MemberInfo using reflection.


CamelCasePropertyNamesContractResolver Class

CamelCasePropertyNamesContractResolver Class
Namespaces ► Newtonsoft.Json.Serialization ► CamelCasePropertyNamesContractResolver
Resolves member mappings for a type, camel casing property names.
Declaration Syntax
C# Visual Basic Visual C++
public class CamelCasePropertyNamesContractResolver : DefaultContractResolver
Public Class CamelCasePropertyNamesContractResolver _
    Inherits DefaultContractResolver
public ref class CamelCasePropertyNamesContractResolver : public DefaultContractResolver
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | CamelCasePropertyNamesContractResolver()()()() | Initializes a new instance of the CamelCasePropertyNamesContractResolver class.
 | CreateArrayContract(Type) | Creates a JsonArrayContract for the given type. (Inherited from DefaultContractResolver.)
 | CreateContract(Type) | Determines which contract type is created for the given type. (Inherited from DefaultContractResolver.)
 | CreateDictionaryContract(Type) | Creates a JsonDictionaryContract for the given type. (Inherited from DefaultContractResolver.)
 | CreateDynamicContract(Type) | Creates a JsonDynamicContract for the given type. (Inherited from DefaultContractResolver.)
 | CreateISerializableContract(Type) | Creates a JsonISerializableContract for the given type. (Inherited from DefaultContractResolver.)
 | CreateLinqContract(Type) | Creates a JsonLinqContract for the given type. (Inherited from DefaultContractResolver.)
 | CreateMemberValueProvider(MemberInfo) | Creates the IValueProvider used by the serializer to get and set values from a member. (Inherited from DefaultContractResolver.)
 | CreateObjectContract(Type) | Creates a JsonObjectContract for the given type. (Inherited from DefaultContractResolver.)
 | CreatePrimitiveContract(Type) | Creates a JsonPrimitiveContract for the given type. (Inherited from DefaultContractResolver.)
 | CreateProperties(Type, MemberSerialization) | Creates properties for the given JsonContract. (Inherited from DefaultContractResolver.)
 | CreateProperty(MemberInfo, MemberSerialization) | Creates a JsonProperty for the given MemberInfo. (Inherited from DefaultContractResolver.)
 | CreateStringContract(Type) | Creates a JsonStringContract for the given type. (Inherited from DefaultContractResolver.)
 | DefaultMembersSearchFlags | Gets or sets the default members search flags. (Inherited from DefaultContractResolver.)
 | DynamicCodeGeneration | Gets a value indicating whether members are being get and set using dynamic code generation. This value is determined by the runtime permissions available. (Inherited from DefaultContractResolver.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSerializableMembers(Type) | Gets the serializable members for the type. (Inherited from DefaultContractResolver.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ResolveContract(Type) | Resolves the contract for a given type. (Inherited from DefaultContractResolver.)
 | ResolveContractConverter(Type) | Resolves the default JsonConverter for the contract. (Inherited from DefaultContractResolver.)
 | ResolvePropertyName(String) | Resolves the name of the property. (Overrides DefaultContractResolver.ResolvePropertyName(String).)
 | SerializeCompilerGeneratedMembers | Gets or sets a value indicating whether compiler generated members should be serialized. (Inherited from DefaultContractResolver.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | DefaultContractResolver
 |  | CamelCasePropertyNamesContractResolver


CamelCasePropertyNamesContractResolver Constructor

CamelCasePropertyNamesContractResolver Constructor
Namespaces ► Newtonsoft.Json.Serialization ► CamelCasePropertyNamesContractResolver ► CamelCasePropertyNamesContractResolver()()()()
Initializes a new instance of the CamelCasePropertyNamesContractResolver class.
Declaration Syntax
C# Visual Basic Visual C++
public CamelCasePropertyNamesContractResolver()
Public Sub New
public:
CamelCasePropertyNamesContractResolver()


ResolvePropertyName Method (propertyName)

ResolvePropertyName Method (propertyName)
Namespaces ► Newtonsoft.Json.Serialization ► CamelCasePropertyNamesContractResolver ► ResolvePropertyName(String)
Resolves the name of the property.
Declaration Syntax
C# Visual Basic Visual C++
protected override string ResolvePropertyName(
    string propertyName
)
Protected Overrides Function ResolvePropertyName ( _
    propertyName As String _
) As String
protected:
virtual String^ ResolvePropertyName(
    String^ propertyName
) override
Parameters
propertyName (String)
Name of the property.
Return Value
The property name camel cased.


DefaultContractResolver Class

DefaultContractResolver Class
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver
Used by JsonSerializer to resolves a JsonContract for a given Type.
Declaration Syntax
C# Visual Basic Visual C++
public class DefaultContractResolver : IContractResolver
Public Class DefaultContractResolver _
    Implements IContractResolver
public ref class DefaultContractResolver : IContractResolver
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | DefaultContractResolver()()()() | Initializes a new instance of the DefaultContractResolver class.
 | DefaultContractResolver(Boolean) | Initializes a new instance of the DefaultContractResolver class.
 | CreateArrayContract(Type) | Creates a JsonArrayContract for the given type.
 | CreateContract(Type) | Determines which contract type is created for the given type.
 | CreateDictionaryContract(Type) | Creates a JsonDictionaryContract for the given type.
 | CreateDynamicContract(Type) | Creates a JsonDynamicContract for the given type.
 | CreateISerializableContract(Type) | Creates a JsonISerializableContract for the given type.
 | CreateLinqContract(Type) | Creates a JsonLinqContract for the given type.
 | CreateMemberValueProvider(MemberInfo) | Creates the IValueProvider used by the serializer to get and set values from a member.
 | CreateObjectContract(Type) | Creates a JsonObjectContract for the given type.
 | CreatePrimitiveContract(Type) | Creates a JsonPrimitiveContract for the given type.
 | CreateProperties(Type, MemberSerialization) | Creates properties for the given JsonContract.
 | CreateProperty(MemberInfo, MemberSerialization) | Creates a JsonProperty for the given MemberInfo.
 | CreateStringContract(Type) | Creates a JsonStringContract for the given type.
 | DefaultMembersSearchFlags | Gets or sets the default members search flags.
 | DynamicCodeGeneration | Gets a value indicating whether members are being get and set using dynamic code generation. This value is determined by the runtime permissions available.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetSerializableMembers(Type) | Gets the serializable members for the type.
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ResolveContract(Type) | Resolves the contract for a given type.
 | ResolveContractConverter(Type) | Resolves the default JsonConverter for the contract.
 | ResolvePropertyName(String) | Resolves the name of the property.
 | SerializeCompilerGeneratedMembers | Gets or sets a value indicating whether compiler generated members should be serialized.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | DefaultContractResolver
 |  | CamelCasePropertyNamesContractResolver


DefaultContractResolver Constructor

DefaultContractResolver Constructor
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► DefaultContractResolver()()()()
Members
Icon | Member | Description
 | DefaultContractResolver()()()() | Initializes a new instance of the DefaultContractResolver class.
 | DefaultContractResolver(Boolean) | Initializes a new instance of the DefaultContractResolver class.


DefaultContractResolver Constructor

DefaultContractResolver Constructor
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► DefaultContractResolver()()()()
Initializes a new instance of the DefaultContractResolver class.
Declaration Syntax
C# Visual Basic Visual C++
public DefaultContractResolver()
Public Sub New
public:
DefaultContractResolver()


DefaultContractResolver Constructor (shareCache)

DefaultContractResolver Constructor (shareCache)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► DefaultContractResolver(Boolean)
Initializes a new instance of the DefaultContractResolver class.
Declaration Syntax
C# Visual Basic Visual C++
public DefaultContractResolver(
    bool shareCache
)
Public Sub New ( _
    shareCache As Boolean _
)
public:
DefaultContractResolver(
    bool shareCache
)
Parameters
shareCache (Boolean)
If set to true the DefaultContractResolver will use a cached shared with other resolvers of the same type. Sharing the cache will significantly performance because expensive reflection will only happen once but could cause unexpected behavior if different instances of the resolver are suppose to produce different results. When set to false it is highly recommended to reuse DefaultContractResolver instances with the JsonSerializer.


CreateArrayContract Method (objectType)

CreateArrayContract Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateArrayContract(Type)
Creates a JsonArrayContract for the given type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonArrayContract CreateArrayContract(
    Type objectType
)
Protected Overridable Function CreateArrayContract ( _
    objectType As Type _
) As JsonArrayContract
protected:
virtual JsonArrayContract^ CreateArrayContract(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value
A JsonArrayContract for the given type.


CreateContract Method (objectType)

CreateContract Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateContract(Type)
Determines which contract type is created for the given type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonContract CreateContract(
    Type objectType
)
Protected Overridable Function CreateContract ( _
    objectType As Type _
) As JsonContract
protected:
virtual JsonContract^ CreateContract(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value
A JsonContract for the given type.


CreateDictionaryContract Method (objectType)

CreateDictionaryContract Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateDictionaryContract(Type)
Creates a JsonDictionaryContract for the given type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonDictionaryContract CreateDictionaryContract(
    Type objectType
)
Protected Overridable Function CreateDictionaryContract ( _
    objectType As Type _
) As JsonDictionaryContract
protected:
virtual JsonDictionaryContract^ CreateDictionaryContract(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value
A JsonDictionaryContract for the given type.


CreateDynamicContract Method (objectType)

CreateDynamicContract Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateDynamicContract(Type)
Creates a JsonDynamicContract for the given type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonDynamicContract CreateDynamicContract(
    Type objectType
)
Protected Overridable Function CreateDynamicContract ( _
    objectType As Type _
) As JsonDynamicContract
protected:
virtual JsonDynamicContract^ CreateDynamicContract(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value
A JsonDynamicContract for the given type.


CreateISerializableContract Method (objectType)

CreateISerializableContract Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateISerializableContract(Type)
Creates a JsonISerializableContract for the given type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonISerializableContract CreateISerializableContract(
    Type objectType
)
Protected Overridable Function CreateISerializableContract ( _
    objectType As Type _
) As JsonISerializableContract
protected:
virtual JsonISerializableContract^ CreateISerializableContract(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value
A JsonISerializableContract for the given type.


CreateLinqContract Method (objectType)

CreateLinqContract Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateLinqContract(Type)
Creates a JsonLinqContract for the given type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonLinqContract CreateLinqContract(
    Type objectType
)
Protected Overridable Function CreateLinqContract ( _
    objectType As Type _
) As JsonLinqContract
protected:
virtual JsonLinqContract^ CreateLinqContract(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value
A JsonLinqContract for the given type.


CreateMemberValueProvider Method (member)

CreateMemberValueProvider Method (member)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateMemberValueProvider(MemberInfo)
Creates the IValueProvider used by the serializer to get and set values from a member.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual IValueProvider CreateMemberValueProvider(
    MemberInfo member
)
Protected Overridable Function CreateMemberValueProvider ( _
    member As MemberInfo _
) As IValueProvider
protected:
virtual IValueProvider^ CreateMemberValueProvider(
    MemberInfo^ member
)
Parameters
member (MemberInfo)
The member.
Return Value
The IValueProvider used by the serializer to get and set values from a member.


CreateObjectContract Method (objectType)

CreateObjectContract Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateObjectContract(Type)
Creates a JsonObjectContract for the given type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonObjectContract CreateObjectContract(
    Type objectType
)
Protected Overridable Function CreateObjectContract ( _
    objectType As Type _
) As JsonObjectContract
protected:
virtual JsonObjectContract^ CreateObjectContract(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value
A JsonObjectContract for the given type.


CreatePrimitiveContract Method (objectType)

CreatePrimitiveContract Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreatePrimitiveContract(Type)
Creates a JsonPrimitiveContract for the given type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonPrimitiveContract CreatePrimitiveContract(
    Type objectType
)
Protected Overridable Function CreatePrimitiveContract ( _
    objectType As Type _
) As JsonPrimitiveContract
protected:
virtual JsonPrimitiveContract^ CreatePrimitiveContract(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value
A JsonPrimitiveContract for the given type.


CreateProperties Method (type, memberSerialization)

CreateProperties Method (type, memberSerialization)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateProperties(Type, MemberSerialization)
Creates properties for the given JsonContract.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual IList<JsonProperty> CreateProperties(
    Type type,
    MemberSerialization memberSerialization
)
Protected Overridable Function CreateProperties ( _
    type As Type, _
    memberSerialization As MemberSerialization _
) As IList(Of JsonProperty)
protected:
virtual IList<JsonProperty^>^ CreateProperties(
    Type^ type,
    MemberSerialization memberSerialization
)
Parameters
type (Type)
The type to create properties for.
memberSerialization (MemberSerialization)
The member serialization mode for the type.
Return Value
Properties for the given JsonContract.


CreateProperty Method (member, memberSerialization)

CreateProperty Method (member, memberSerialization)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateProperty(MemberInfo, MemberSerialization)
Creates a JsonProperty for the given MemberInfo.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonProperty CreateProperty(
    MemberInfo member,
    MemberSerialization memberSerialization
)
Protected Overridable Function CreateProperty ( _
    member As MemberInfo, _
    memberSerialization As MemberSerialization _
) As JsonProperty
protected:
virtual JsonProperty^ CreateProperty(
    MemberInfo^ member,
    MemberSerialization memberSerialization
)
Parameters
member (MemberInfo)
The member to create a JsonProperty for.
memberSerialization (MemberSerialization)
The member's parent MemberSerialization.
Return Value
A created JsonProperty for the given MemberInfo.


CreateStringContract Method (objectType)

CreateStringContract Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► CreateStringContract(Type)
Creates a JsonStringContract for the given type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonStringContract CreateStringContract(
    Type objectType
)
Protected Overridable Function CreateStringContract ( _
    objectType As Type _
) As JsonStringContract
protected:
virtual JsonStringContract^ CreateStringContract(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value
A JsonStringContract for the given type.


DefaultMembersSearchFlags Property

DefaultMembersSearchFlags Property
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► DefaultMembersSearchFlags
Gets or sets the default members search flags.
Declaration Syntax
C# Visual Basic Visual C++
public BindingFlags DefaultMembersSearchFlags { get; set; }
Public Property DefaultMembersSearchFlags As BindingFlags
    Get
    Set
public:
property BindingFlags DefaultMembersSearchFlags {
    BindingFlags get ();
    void set (BindingFlags value);
}
Value
The default members search flags.


DynamicCodeGeneration Property

DynamicCodeGeneration Property
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► DynamicCodeGeneration
Gets a value indicating whether members are being get and set using dynamic code generation. This value is determined by the runtime permissions available.
Declaration Syntax
C# Visual Basic Visual C++
public bool DynamicCodeGeneration { get; }
Public ReadOnly Property DynamicCodeGeneration As Boolean
    Get
public:
property bool DynamicCodeGeneration {
    bool get ();
}
Value
true if using dynamic code generation; otherwise, false.


GetSerializableMembers Method (objectType)

GetSerializableMembers Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► GetSerializableMembers(Type)
Gets the serializable members for the type.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual List<MemberInfo> GetSerializableMembers(
    Type objectType
)
Protected Overridable Function GetSerializableMembers ( _
    objectType As Type _
) As List(Of MemberInfo)
protected:
virtual List<MemberInfo^>^ GetSerializableMembers(
    Type^ objectType
)
Parameters
objectType (Type)
The type to get serializable members for.
Return Value
The serializable members for the type.


ResolveContract Method (type)

ResolveContract Method (type)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► ResolveContract(Type)
Resolves the contract for a given type.
Declaration Syntax
C# Visual Basic Visual C++
public virtual JsonContract ResolveContract(
    Type type
)
Public Overridable Function ResolveContract ( _
    type As Type _
) As JsonContract
public:
virtual JsonContract^ ResolveContract(
    Type^ type
)
Parameters
type (Type)
The type to resolve a contract for.
Return Value
The contract for a given type.


ResolveContractConverter Method (objectType)

ResolveContractConverter Method (objectType)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► ResolveContractConverter(Type)
Resolves the default JsonConverter for the contract.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual JsonConverter ResolveContractConverter(
    Type objectType
)
Protected Overridable Function ResolveContractConverter ( _
    objectType As Type _
) As JsonConverter
protected:
virtual JsonConverter^ ResolveContractConverter(
    Type^ objectType
)
Parameters
objectType (Type)
Type of the object.
Return Value

[Missing <returns> documentation for "M:Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContractConverter(System.Type)"]


ResolvePropertyName Method (propertyName)

ResolvePropertyName Method (propertyName)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► ResolvePropertyName(String)
Resolves the name of the property.
Declaration Syntax
C# Visual Basic Visual C++
protected virtual string ResolvePropertyName(
    string propertyName
)
Protected Overridable Function ResolvePropertyName ( _
    propertyName As String _
) As String
protected:
virtual String^ ResolvePropertyName(
    String^ propertyName
)
Parameters
propertyName (String)
Name of the property.
Return Value
Name of the property.


SerializeCompilerGeneratedMembers Property

SerializeCompilerGeneratedMembers Property
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► SerializeCompilerGeneratedMembers
Gets or sets a value indicating whether compiler generated members should be serialized.
Declaration Syntax
C# Visual Basic Visual C++
public bool SerializeCompilerGeneratedMembers { get; set; }
Public Property SerializeCompilerGeneratedMembers As Boolean
    Get
    Set
public:
property bool SerializeCompilerGeneratedMembers {
    bool get ();
    void set (bool value);
}
Value
true if serialized compiler generated members; otherwise, false.


DefaultSerializationBinder Class

DefaultSerializationBinder Class
Namespaces ► Newtonsoft.Json.Serialization ► DefaultSerializationBinder
The default serialization binder used when resolving and loading classes from type names.
Declaration Syntax
C# Visual Basic Visual C++
public class DefaultSerializationBinder : SerializationBinder
Public Class DefaultSerializationBinder _
    Inherits SerializationBinder
public ref class DefaultSerializationBinder : public SerializationBinder
Members
All Members | Constructors | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | DefaultSerializationBinder()()()() | Initializes a new instance of the DefaultSerializationBinder class
 | BindToType(String, String) | When overridden in a derived class, controls the binding of a serialized object to a type. (Overrides SerializationBinder.BindToType(String, String).)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | SerializationBinder
 |  | DefaultSerializationBinder


DefaultSerializationBinder Constructor

DefaultSerializationBinder Constructor
Namespaces ► Newtonsoft.Json.Serialization ► DefaultSerializationBinder ► DefaultSerializationBinder()()()()
Initializes a new instance of the DefaultSerializationBinder class
Declaration Syntax
C# Visual Basic Visual C++
public DefaultSerializationBinder()
Public Sub New
public:
DefaultSerializationBinder()


BindToType Method (assemblyName, typeName)

BindToType Method (assemblyName, typeName)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultSerializationBinder ► BindToType(String, String)
When overridden in a derived class, controls the binding of a serialized object to a type.
Declaration Syntax
C# Visual Basic Visual C++
public override Type BindToType(
    string assemblyName,
    string typeName
)
Public Overrides Function BindToType ( _
    assemblyName As String, _
    typeName As String _
) As Type
public:
virtual Type^ BindToType(
    String^ assemblyName,
    String^ typeName
) override
Parameters
assemblyName (String)
Specifies the Assembly name of the serialized object.
typeName (String)
Specifies the Type name of the serialized object.
Return Value
The type of the object the formatter creates a new instance of.


DynamicValueProvider Class

DynamicValueProvider Class
Namespaces ► Newtonsoft.Json.Serialization ► DynamicValueProvider
Get and set values for a MemberInfo using dynamic methods.
Declaration Syntax
C# Visual Basic Visual C++
public class DynamicValueProvider : IValueProvider
Public Class DynamicValueProvider _
    Implements IValueProvider
public ref class DynamicValueProvider : IValueProvider
Members
All Members | Constructors | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | DynamicValueProvider(MemberInfo) | Initializes a new instance of the DynamicValueProvider class.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | GetValue(Object) | Gets the value.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | SetValue(Object, Object) | Sets the value.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
DynamicValueProvider


DynamicValueProvider Constructor (memberInfo)

DynamicValueProvider Constructor (memberInfo)
Namespaces ► Newtonsoft.Json.Serialization ► DynamicValueProvider ► DynamicValueProvider(MemberInfo)
Initializes a new instance of the DynamicValueProvider class.
Declaration Syntax
C# Visual Basic Visual C++
public DynamicValueProvider(
    MemberInfo memberInfo
)
Public Sub New ( _
    memberInfo As MemberInfo _
)
public:
DynamicValueProvider(
    MemberInfo^ memberInfo
)
Parameters
memberInfo (MemberInfo)
The member info.


GetValue Method (target)

GetValue Method (target)
Namespaces ► Newtonsoft.Json.Serialization ► DynamicValueProvider ► GetValue(Object)
Gets the value.
Declaration Syntax
C# Visual Basic Visual C++
public Object GetValue(
    Object target
)
Public Function GetValue ( _
    target As Object _
) As Object
public:
virtual Object^ GetValue(
    Object^ target
) sealed
Parameters
target (Object)
The target to get the value from.
Return Value
The value.


SetValue Method (target, value)

SetValue Method (target, value)
Namespaces ► Newtonsoft.Json.Serialization ► DynamicValueProvider ► SetValue(Object, Object)
Sets the value.
Declaration Syntax
C# Visual Basic Visual C++
public void SetValue(
    Object target,
    Object value
)
Public Sub SetValue ( _
    target As Object, _
    value As Object _
)
public:
virtual void SetValue(
    Object^ target,
    Object^ value
) sealed
Parameters
target (Object)
The target to set the value on.
value (Object)
The value to set on the target.


ErrorContext Class

ErrorContext Class
Namespaces ► Newtonsoft.Json.Serialization ► ErrorContext
Provides information surrounding an error.
Declaration Syntax
C# Visual Basic Visual C++
public class ErrorContext
Public Class ErrorContext
public ref class ErrorContext
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Error | Gets or sets the error.
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Handled | Gets or sets a value indicating whether this ErrorContext is handled.
 | Member | Gets the member that caused the error.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OriginalObject | Gets the original object that caused the error.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
ErrorContext


Error Property

Error Property
Namespaces ► Newtonsoft.Json.Serialization ► ErrorContext ► Error
Gets or sets the error.
Declaration Syntax
C# Visual Basic Visual C++
public Exception Error { get; private set; }
Public Property Error As Exception
    Get
    Private Set
public:
property Exception^ Error {
    Exception^ get ();
    private: void set (Exception^ value);
}
Value
The error.


Handled Property

Handled Property
Namespaces ► Newtonsoft.Json.Serialization ► ErrorContext ► Handled
Gets or sets a value indicating whether this ErrorContext is handled.
Declaration Syntax
C# Visual Basic Visual C++
public bool Handled { get; set; }
Public Property Handled As Boolean
    Get
    Set
public:
property bool Handled {
    bool get ();
    void set (bool value);
}
Value
true if handled; otherwise, false.


Member Property

Member Property
Namespaces ► Newtonsoft.Json.Serialization ► ErrorContext ► Member
Gets the member that caused the error.
Declaration Syntax
C# Visual Basic Visual C++
public Object Member { get; private set; }
Public Property Member As Object
    Get
    Private Set
public:
property Object^ Member {
    Object^ get ();
    private: void set (Object^ value);
}
Value
The member that caused the error.


OriginalObject Property

OriginalObject Property
Namespaces ► Newtonsoft.Json.Serialization ► ErrorContext ► OriginalObject
Gets the original object that caused the error.
Declaration Syntax
C# Visual Basic Visual C++
public Object OriginalObject { get; private set; }
Public Property OriginalObject As Object
    Get
    Private Set
public:
property Object^ OriginalObject {
    Object^ get ();
    private: void set (Object^ value);
}
Value
The original object that caused the error.


ErrorEventArgs Class

ErrorEventArgs Class
Namespaces ► Newtonsoft.Json.Serialization ► ErrorEventArgs
Provides data for the Error event.
Declaration Syntax
C# Visual Basic Visual C++
public class ErrorEventArgs : EventArgs
Public Class ErrorEventArgs _
    Inherits EventArgs
public ref class ErrorEventArgs : public EventArgs
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | ErrorEventArgs(Object, ErrorContext) | Initializes a new instance of the ErrorEventArgs class.
 | CurrentObject | Gets the current object the error event is being raised against.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | ErrorContext | Gets the error context.
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | EventArgs
 |  | ErrorEventArgs


ErrorEventArgs Constructor (currentObject, errorContext)

ErrorEventArgs Constructor (currentObject, errorContext)
Namespaces ► Newtonsoft.Json.Serialization ► ErrorEventArgs ► ErrorEventArgs(Object, ErrorContext)
Initializes a new instance of the ErrorEventArgs class.
Declaration Syntax
C# Visual Basic Visual C++
public ErrorEventArgs(
    Object currentObject,
    ErrorContext errorContext
)
Public Sub New ( _
    currentObject As Object, _
    errorContext As ErrorContext _
)
public:
ErrorEventArgs(
    Object^ currentObject,
    ErrorContext^ errorContext
)
Parameters
currentObject (Object)
The current object.
errorContext (ErrorContext)
The error context.


CurrentObject Property

CurrentObject Property
Namespaces ► Newtonsoft.Json.Serialization ► ErrorEventArgs ► CurrentObject
Gets the current object the error event is being raised against.
Declaration Syntax
C# Visual Basic Visual C++
public Object CurrentObject { get; private set; }
Public Property CurrentObject As Object
    Get
    Private Set
public:
property Object^ CurrentObject {
    Object^ get ();
    private: void set (Object^ value);
}
Value
The current object the error event is being raised against.


ErrorContext Property

ErrorContext Property
Namespaces ► Newtonsoft.Json.Serialization ► ErrorEventArgs ► ErrorContext
Gets the error context.
Declaration Syntax
C# Visual Basic Visual C++
public ErrorContext ErrorContext { get; private set; }
Public Property ErrorContext As ErrorContext
    Get
    Private Set
public:
property ErrorContext^ ErrorContext {
    ErrorContext^ get ();
    private: void set (ErrorContext^ value);
}
Value
The error context.


IContractResolver Interface

IContractResolver Interface
Namespaces ► Newtonsoft.Json.Serialization ► IContractResolver
Used by JsonSerializer to resolves a JsonContract for a given Type.
Declaration Syntax
C# Visual Basic Visual C++
public interface IContractResolver
Public Interface IContractResolver
public interface class IContractResolver
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | ResolveContract(Type) | Resolves the contract for a given type.


ResolveContract Method (type)

ResolveContract Method (type)
Namespaces ► Newtonsoft.Json.Serialization ► IContractResolver ► ResolveContract(Type)
Resolves the contract for a given type.
Declaration Syntax
C# Visual Basic Visual C++
JsonContract ResolveContract(
    Type type
)
Function ResolveContract ( _
    type As Type _
) As JsonContract
JsonContract^ ResolveContract(
    Type^ type
)
Parameters
type (Type)
The type to resolve a contract for.
Return Value
The contract for a given type.


IReferenceResolver Interface

IReferenceResolver Interface
Namespaces ► Newtonsoft.Json.Serialization ► IReferenceResolver
Used to resolve references when serializing and deserializing JSON by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public interface IReferenceResolver
Public Interface IReferenceResolver
public interface class IReferenceResolver
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | AddReference(Object, String, Object) | Adds a reference to the specified object.
 | GetReference(Object, Object) | Gets the reference for the sepecified object.
 | IsReferenced(Object, Object) | Determines whether the specified object is referenced.
 | ResolveReference(Object, String) | Resolves a reference to its object.


AddReference Method (context, reference, value)

AddReference Method (context, reference, value)
Namespaces ► Newtonsoft.Json.Serialization ► IReferenceResolver ► AddReference(Object, String, Object)
Adds a reference to the specified object.
Declaration Syntax
C# Visual Basic Visual C++
void AddReference(
    Object context,
    string reference,
    Object value
)
Sub AddReference ( _
    context As Object, _
    reference As String, _
    value As Object _
)
void AddReference(
    Object^ context,
    String^ reference,
    Object^ value
)
Parameters
context (Object)
The serialization context.
reference (String)
The reference.
value (Object)
The object to reference.


GetReference Method (context, value)

GetReference Method (context, value)
Namespaces ► Newtonsoft.Json.Serialization ► IReferenceResolver ► GetReference(Object, Object)
Gets the reference for the sepecified object.
Declaration Syntax
C# Visual Basic Visual C++
string GetReference(
    Object context,
    Object value
)
Function GetReference ( _
    context As Object, _
    value As Object _
) As String
String^ GetReference(
    Object^ context,
    Object^ value
)
Parameters
context (Object)
The serialization context.
value (Object)
The object to get a reference for.
Return Value
The reference to the object.


IsReferenced Method (context, value)

IsReferenced Method (context, value)
Namespaces ► Newtonsoft.Json.Serialization ► IReferenceResolver ► IsReferenced(Object, Object)
Determines whether the specified object is referenced.
Declaration Syntax
C# Visual Basic Visual C++
bool IsReferenced(
    Object context,
    Object value
)
Function IsReferenced ( _
    context As Object, _
    value As Object _
) As Boolean
bool IsReferenced(
    Object^ context,
    Object^ value
)
Parameters
context (Object)
The serialization context.
value (Object)
The object to test for a reference.
Return Value
true if the specified object is referenced; otherwise, false.


ResolveReference Method (context, reference)

ResolveReference Method (context, reference)
Namespaces ► Newtonsoft.Json.Serialization ► IReferenceResolver ► ResolveReference(Object, String)
Resolves a reference to its object.
Declaration Syntax
C# Visual Basic Visual C++
Object ResolveReference(
    Object context,
    string reference
)
Function ResolveReference ( _
    context As Object, _
    reference As String _
) As Object
Object^ ResolveReference(
    Object^ context,
    String^ reference
)
Parameters
context (Object)
The serialization context.
reference (String)
The reference to resolve.
Return Value
The object that


IValueProvider Interface

IValueProvider Interface
Namespaces ► Newtonsoft.Json.Serialization ► IValueProvider
Provides methods to get and set values.
Declaration Syntax
C# Visual Basic Visual C++
public interface IValueProvider
Public Interface IValueProvider
public interface class IValueProvider
Members
All Members | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | GetValue(Object) | Gets the value.
 | SetValue(Object, Object) | Sets the value.


GetValue Method (target)

GetValue Method (target)
Namespaces ► Newtonsoft.Json.Serialization ► IValueProvider ► GetValue(Object)
Gets the value.
Declaration Syntax
C# Visual Basic Visual C++
Object GetValue(
    Object target
)
Function GetValue ( _
    target As Object _
) As Object
Object^ GetValue(
    Object^ target
)
Parameters
target (Object)
The target to get the value from.
Return Value
The value.


SetValue Method (target, value)

SetValue Method (target, value)
Namespaces ► Newtonsoft.Json.Serialization ► IValueProvider ► SetValue(Object, Object)
Sets the value.
Declaration Syntax
C# Visual Basic Visual C++
void SetValue(
    Object target,
    Object value
)
Sub SetValue ( _
    target As Object, _
    value As Object _
)
void SetValue(
    Object^ target,
    Object^ value
)
Parameters
target (Object)
The target to set the value on.
value (Object)
The value to set on the target.


JsonArrayContract Class

JsonArrayContract Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonArrayContract
Contract details for a Type used by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonArrayContract : JsonContract
Public Class JsonArrayContract _
    Inherits JsonContract
public ref class JsonArrayContract : public JsonContract
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonArrayContract(Type) | Initializes a new instance of the JsonArrayContract class.
 | Converter | Gets or sets the default JsonConverter for this contract. (Inherited from JsonContract.)
 | CreatedType | Gets or sets the type created during deserialization. (Inherited from JsonContract.)
 | DefaultCreator | Gets or sets the default creator method used to create the object. (Inherited from JsonContract.)
 | DefaultCreatorNonPublic | Gets or sets a value indicating whether [default creator non public]. (Inherited from JsonContract.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsReference | Gets or sets whether this type contract is serialized as a reference. (Inherited from JsonContract.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OnDeserialized | Gets or sets the method called immediately after deserialization of the object. (Inherited from JsonContract.)
 | OnDeserializing | Gets or sets the method called during deserialization of the object. (Inherited from JsonContract.)
 | OnError | Gets or sets the method called when an error is thrown during the serialization of the object. (Inherited from JsonContract.)
 | OnSerialized | Gets or sets the method called after serialization of the object graph. (Inherited from JsonContract.)
 | OnSerializing | Gets or sets the method called before serialization of the object. (Inherited from JsonContract.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UnderlyingType | Gets the underlying type for the contract. (Inherited from JsonContract.)
Inheritance Hierarchy
Object
 | JsonContract
 |  | JsonArrayContract


JsonArrayContract Constructor (underlyingType)

JsonArrayContract Constructor (underlyingType)
Namespaces ► Newtonsoft.Json.Serialization ► JsonArrayContract ► JsonArrayContract(Type)
Initializes a new instance of the JsonArrayContract class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonArrayContract(
    Type underlyingType
)
Public Sub New ( _
    underlyingType As Type _
)
public:
JsonArrayContract(
    Type^ underlyingType
)
Parameters
underlyingType (Type)
The underlying type for the contract.


JsonContract Class

JsonContract Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract
Contract details for a Type used by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public abstract class JsonContract
Public MustInherit Class JsonContract
public ref class JsonContract abstract
Members
All Members | Methods | Properties
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | Converter | Gets or sets the default JsonConverter for this contract.
 | CreatedType | Gets or sets the type created during deserialization.
 | DefaultCreator | Gets or sets the default creator method used to create the object.
 | DefaultCreatorNonPublic | Gets or sets a value indicating whether [default creator non public].
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsReference | Gets or sets whether this type contract is serialized as a reference.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OnDeserialized | Gets or sets the method called immediately after deserialization of the object.
 | OnDeserializing | Gets or sets the method called during deserialization of the object.
 | OnError | Gets or sets the method called when an error is thrown during the serialization of the object.
 | OnSerialized | Gets or sets the method called after serialization of the object graph.
 | OnSerializing | Gets or sets the method called before serialization of the object.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UnderlyingType | Gets the underlying type for the contract.
Inheritance Hierarchy
Object
 | JsonContract
 |  | JsonArrayContract
 |  | JsonDictionaryContract
 |  | JsonDynamicContract
 |  | JsonISerializableContract
 |  | JsonLinqContract
 |  | JsonObjectContract
 |  | JsonPrimitiveContract
 |  | JsonStringContract


Converter Property

Converter Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► Converter
Gets or sets the default JsonConverter for this contract.
Declaration Syntax
C# Visual Basic Visual C++
public JsonConverter Converter { get; set; }
Public Property Converter As JsonConverter
    Get
    Set
public:
property JsonConverter^ Converter {
    JsonConverter^ get ();
    void set (JsonConverter^ value);
}
Value
The converter.


CreatedType Property

CreatedType Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► CreatedType
Gets or sets the type created during deserialization.
Declaration Syntax
C# Visual Basic Visual C++
public Type CreatedType { get; set; }
Public Property CreatedType As Type
    Get
    Set
public:
property Type^ CreatedType {
    Type^ get ();
    void set (Type^ value);
}
Value
The type created during deserialization.


DefaultCreator Property

DefaultCreator Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► DefaultCreator
Gets or sets the default creator method used to create the object.
Declaration Syntax
C# Visual Basic Visual C++
public Func DefaultCreator { get; set; }
Public Property DefaultCreator As Func
    Get
    Set
public:
property Func^ DefaultCreator {
    Func^ get ();
    void set (Func^ value);
}
Value
The default creator method used to create the object.


DefaultCreatorNonPublic Property

DefaultCreatorNonPublic Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► DefaultCreatorNonPublic
Gets or sets a value indicating whether [default creator non public].
Declaration Syntax
C# Visual Basic Visual C++
public bool DefaultCreatorNonPublic { get; set; }
Public Property DefaultCreatorNonPublic As Boolean
    Get
    Set
public:
property bool DefaultCreatorNonPublic {
    bool get ();
    void set (bool value);
}
Value
true if the default object creator is non-public; otherwise, false.


IsReference Property

IsReference Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► IsReference
Gets or sets whether this type contract is serialized as a reference.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<bool> IsReference { get; set; }
Public Property IsReference As Nullable(Of Boolean)
    Get
    Set
public:
property Nullable<bool> IsReference {
    Nullable<bool> get ();
    void set (Nullable<bool> value);
}
Value
Whether this type contract is serialized as a reference.


OnDeserialized Property

OnDeserialized Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► OnDeserialized
Gets or sets the method called immediately after deserialization of the object.
Declaration Syntax
C# Visual Basic Visual C++
public MethodInfo OnDeserialized { get; set; }
Public Property OnDeserialized As MethodInfo
    Get
    Set
public:
property MethodInfo^ OnDeserialized {
    MethodInfo^ get ();
    void set (MethodInfo^ value);
}
Value
The method called immediately after deserialization of the object.


OnDeserializing Property

OnDeserializing Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► OnDeserializing
Gets or sets the method called during deserialization of the object.
Declaration Syntax
C# Visual Basic Visual C++
public MethodInfo OnDeserializing { get; set; }
Public Property OnDeserializing As MethodInfo
    Get
    Set
public:
property MethodInfo^ OnDeserializing {
    MethodInfo^ get ();
    void set (MethodInfo^ value);
}
Value
The method called during deserialization of the object.


OnError Property

OnError Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► OnError
Gets or sets the method called when an error is thrown during the serialization of the object.
Declaration Syntax
C# Visual Basic Visual C++
public MethodInfo OnError { get; set; }
Public Property OnError As MethodInfo
    Get
    Set
public:
property MethodInfo^ OnError {
    MethodInfo^ get ();
    void set (MethodInfo^ value);
}
Value
The method called when an error is thrown during the serialization of the object.


OnSerialized Property

OnSerialized Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► OnSerialized
Gets or sets the method called after serialization of the object graph.
Declaration Syntax
C# Visual Basic Visual C++
public MethodInfo OnSerialized { get; set; }
Public Property OnSerialized As MethodInfo
    Get
    Set
public:
property MethodInfo^ OnSerialized {
    MethodInfo^ get ();
    void set (MethodInfo^ value);
}
Value
The method called after serialization of the object graph.


OnSerializing Property

OnSerializing Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► OnSerializing
Gets or sets the method called before serialization of the object.
Declaration Syntax
C# Visual Basic Visual C++
public MethodInfo OnSerializing { get; set; }
Public Property OnSerializing As MethodInfo
    Get
    Set
public:
property MethodInfo^ OnSerializing {
    MethodInfo^ get ();
    void set (MethodInfo^ value);
}
Value
The method called before serialization of the object.


UnderlyingType Property

UnderlyingType Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonContract ► UnderlyingType
Gets the underlying type for the contract.
Declaration Syntax
C# Visual Basic Visual C++
public Type UnderlyingType { get; private set; }
Public Property UnderlyingType As Type
    Get
    Private Set
public:
property Type^ UnderlyingType {
    Type^ get ();
    private: void set (Type^ value);
}
Value
The underlying type for the contract.


JsonDictionaryContract Class

JsonDictionaryContract Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonDictionaryContract
Contract details for a Type used by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonDictionaryContract : JsonContract
Public Class JsonDictionaryContract _
    Inherits JsonContract
public ref class JsonDictionaryContract : public JsonContract
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonDictionaryContract(Type) | Initializes a new instance of the JsonDictionaryContract class.
 | Converter | Gets or sets the default JsonConverter for this contract. (Inherited from JsonContract.)
 | CreatedType | Gets or sets the type created during deserialization. (Inherited from JsonContract.)
 | DefaultCreator | Gets or sets the default creator method used to create the object. (Inherited from JsonContract.)
 | DefaultCreatorNonPublic | Gets or sets a value indicating whether [default creator non public]. (Inherited from JsonContract.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsReference | Gets or sets whether this type contract is serialized as a reference. (Inherited from JsonContract.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OnDeserialized | Gets or sets the method called immediately after deserialization of the object. (Inherited from JsonContract.)
 | OnDeserializing | Gets or sets the method called during deserialization of the object. (Inherited from JsonContract.)
 | OnError | Gets or sets the method called when an error is thrown during the serialization of the object. (Inherited from JsonContract.)
 | OnSerialized | Gets or sets the method called after serialization of the object graph. (Inherited from JsonContract.)
 | OnSerializing | Gets or sets the method called before serialization of the object. (Inherited from JsonContract.)
 | PropertyNameResolver | Gets or sets the property name resolver.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UnderlyingType | Gets the underlying type for the contract. (Inherited from JsonContract.)
Inheritance Hierarchy
Object
 | JsonContract
 |  | JsonDictionaryContract


JsonDictionaryContract Constructor (underlyingType)

JsonDictionaryContract Constructor (underlyingType)
Namespaces ► Newtonsoft.Json.Serialization ► JsonDictionaryContract ► JsonDictionaryContract(Type)
Initializes a new instance of the JsonDictionaryContract class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonDictionaryContract(
    Type underlyingType
)
Public Sub New ( _
    underlyingType As Type _
)
public:
JsonDictionaryContract(
    Type^ underlyingType
)
Parameters
underlyingType (Type)
The underlying type for the contract.


PropertyNameResolver Property

PropertyNameResolver Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonDictionaryContract ► PropertyNameResolver
Gets or sets the property name resolver.
Declaration Syntax
C# Visual Basic Visual C++
public Func PropertyNameResolver { get; set; }
Public Property PropertyNameResolver As Func
    Get
    Set
public:
property Func^ PropertyNameResolver {
    Func^ get ();
    void set (Func^ value);
}
Value
The property name resolver.


JsonDynamicContract Class

JsonDynamicContract Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonDynamicContract
Contract details for a Type used by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonDynamicContract : JsonContract
Public Class JsonDynamicContract _
    Inherits JsonContract
public ref class JsonDynamicContract : public JsonContract
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonDynamicContract(Type) | Initializes a new instance of the JsonDynamicContract class.
 | Converter | Gets or sets the default JsonConverter for this contract. (Inherited from JsonContract.)
 | CreatedType | Gets or sets the type created during deserialization. (Inherited from JsonContract.)
 | DefaultCreator | Gets or sets the default creator method used to create the object. (Inherited from JsonContract.)
 | DefaultCreatorNonPublic | Gets or sets a value indicating whether [default creator non public]. (Inherited from JsonContract.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsReference | Gets or sets whether this type contract is serialized as a reference. (Inherited from JsonContract.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OnDeserialized | Gets or sets the method called immediately after deserialization of the object. (Inherited from JsonContract.)
 | OnDeserializing | Gets or sets the method called during deserialization of the object. (Inherited from JsonContract.)
 | OnError | Gets or sets the method called when an error is thrown during the serialization of the object. (Inherited from JsonContract.)
 | OnSerialized | Gets or sets the method called after serialization of the object graph. (Inherited from JsonContract.)
 | OnSerializing | Gets or sets the method called before serialization of the object. (Inherited from JsonContract.)
 | Properties | Gets the object's properties.
 | PropertyNameResolver | Gets or sets the property name resolver.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UnderlyingType | Gets the underlying type for the contract. (Inherited from JsonContract.)
Inheritance Hierarchy
Object
 | JsonContract
 |  | JsonDynamicContract


JsonDynamicContract Constructor (underlyingType)

JsonDynamicContract Constructor (underlyingType)
Namespaces ► Newtonsoft.Json.Serialization ► JsonDynamicContract ► JsonDynamicContract(Type)
Initializes a new instance of the JsonDynamicContract class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonDynamicContract(
    Type underlyingType
)
Public Sub New ( _
    underlyingType As Type _
)
public:
JsonDynamicContract(
    Type^ underlyingType
)
Parameters
underlyingType (Type)
The underlying type for the contract.


Properties Property

Properties Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonDynamicContract ► Properties
Gets the object's properties.
Declaration Syntax
C# Visual Basic Visual C++
public JsonPropertyCollection Properties { get; private set; }
Public Property Properties As JsonPropertyCollection
    Get
    Private Set
public:
property JsonPropertyCollection^ Properties {
    JsonPropertyCollection^ get ();
    private: void set (JsonPropertyCollection^ value);
}
Value
The object's properties.


PropertyNameResolver Property

PropertyNameResolver Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonDynamicContract ► PropertyNameResolver
Gets or sets the property name resolver.
Declaration Syntax
C# Visual Basic Visual C++
public Func PropertyNameResolver { get; set; }
Public Property PropertyNameResolver As Func
    Get
    Set
public:
property Func^ PropertyNameResolver {
    Func^ get ();
    void set (Func^ value);
}
Value
The property name resolver.


JsonISerializableContract Class

JsonISerializableContract Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonISerializableContract
Contract details for a Type used by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonISerializableContract : JsonContract
Public Class JsonISerializableContract _
    Inherits JsonContract
public ref class JsonISerializableContract : public JsonContract
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonISerializableContract(Type) | Initializes a new instance of the JsonISerializableContract class.
 | Converter | Gets or sets the default JsonConverter for this contract. (Inherited from JsonContract.)
 | CreatedType | Gets or sets the type created during deserialization. (Inherited from JsonContract.)
 | DefaultCreator | Gets or sets the default creator method used to create the object. (Inherited from JsonContract.)
 | DefaultCreatorNonPublic | Gets or sets a value indicating whether [default creator non public]. (Inherited from JsonContract.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | ISerializableCreator | Gets or sets the ISerializable object constructor.
 | IsReference | Gets or sets whether this type contract is serialized as a reference. (Inherited from JsonContract.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OnDeserialized | Gets or sets the method called immediately after deserialization of the object. (Inherited from JsonContract.)
 | OnDeserializing | Gets or sets the method called during deserialization of the object. (Inherited from JsonContract.)
 | OnError | Gets or sets the method called when an error is thrown during the serialization of the object. (Inherited from JsonContract.)
 | OnSerialized | Gets or sets the method called after serialization of the object graph. (Inherited from JsonContract.)
 | OnSerializing | Gets or sets the method called before serialization of the object. (Inherited from JsonContract.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UnderlyingType | Gets the underlying type for the contract. (Inherited from JsonContract.)
Inheritance Hierarchy
Object
 | JsonContract
 |  | JsonISerializableContract


JsonISerializableContract Constructor (underlyingType)

JsonISerializableContract Constructor (underlyingType)
Namespaces ► Newtonsoft.Json.Serialization ► JsonISerializableContract ► JsonISerializableContract(Type)
Initializes a new instance of the JsonISerializableContract class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonISerializableContract(
    Type underlyingType
)
Public Sub New ( _
    underlyingType As Type _
)
public:
JsonISerializableContract(
    Type^ underlyingType
)
Parameters
underlyingType (Type)
The underlying type for the contract.


ISerializableCreator Property

ISerializableCreator Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonISerializableContract ► ISerializableCreator
Gets or sets the ISerializable object constructor.
Declaration Syntax
C# Visual Basic Visual C++
public ObjectConstructor<Object> ISerializableCreator { get; set; }
Public Property ISerializableCreator As ObjectConstructor(Of Object)
    Get
    Set
public:
property ObjectConstructor<Object^>^ ISerializableCreator {
    ObjectConstructor<Object^>^ get ();
    void set (ObjectConstructor<Object^>^ value);
}
Value
The ISerializable object constructor.


JsonLinqContract Class

JsonLinqContract Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonLinqContract
Contract details for a Type used by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonLinqContract : JsonContract
Public Class JsonLinqContract _
    Inherits JsonContract
public ref class JsonLinqContract : public JsonContract
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonLinqContract(Type) | Initializes a new instance of the JsonLinqContract class.
 | Converter | Gets or sets the default JsonConverter for this contract. (Inherited from JsonContract.)
 | CreatedType | Gets or sets the type created during deserialization. (Inherited from JsonContract.)
 | DefaultCreator | Gets or sets the default creator method used to create the object. (Inherited from JsonContract.)
 | DefaultCreatorNonPublic | Gets or sets a value indicating whether [default creator non public]. (Inherited from JsonContract.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsReference | Gets or sets whether this type contract is serialized as a reference. (Inherited from JsonContract.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OnDeserialized | Gets or sets the method called immediately after deserialization of the object. (Inherited from JsonContract.)
 | OnDeserializing | Gets or sets the method called during deserialization of the object. (Inherited from JsonContract.)
 | OnError | Gets or sets the method called when an error is thrown during the serialization of the object. (Inherited from JsonContract.)
 | OnSerialized | Gets or sets the method called after serialization of the object graph. (Inherited from JsonContract.)
 | OnSerializing | Gets or sets the method called before serialization of the object. (Inherited from JsonContract.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UnderlyingType | Gets the underlying type for the contract. (Inherited from JsonContract.)
Inheritance Hierarchy
Object
 | JsonContract
 |  | JsonLinqContract


JsonLinqContract Constructor (underlyingType)

JsonLinqContract Constructor (underlyingType)
Namespaces ► Newtonsoft.Json.Serialization ► JsonLinqContract ► JsonLinqContract(Type)
Initializes a new instance of the JsonLinqContract class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonLinqContract(
    Type underlyingType
)
Public Sub New ( _
    underlyingType As Type _
)
public:
JsonLinqContract(
    Type^ underlyingType
)
Parameters
underlyingType (Type)
The underlying type for the contract.


JsonObjectContract Class

JsonObjectContract Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonObjectContract
Contract details for a Type used by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonObjectContract : JsonContract
Public Class JsonObjectContract _
    Inherits JsonContract
public ref class JsonObjectContract : public JsonContract
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonObjectContract(Type) | Initializes a new instance of the JsonObjectContract class.
 | Converter | Gets or sets the default JsonConverter for this contract. (Inherited from JsonContract.)
 | CreatedType | Gets or sets the type created during deserialization. (Inherited from JsonContract.)
 | DefaultCreator | Gets or sets the default creator method used to create the object. (Inherited from JsonContract.)
 | DefaultCreatorNonPublic | Gets or sets a value indicating whether [default creator non public]. (Inherited from JsonContract.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsReference | Gets or sets whether this type contract is serialized as a reference. (Inherited from JsonContract.)
 | MemberSerialization | Gets or sets the object member serialization.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OnDeserialized | Gets or sets the method called immediately after deserialization of the object. (Inherited from JsonContract.)
 | OnDeserializing | Gets or sets the method called during deserialization of the object. (Inherited from JsonContract.)
 | OnError | Gets or sets the method called when an error is thrown during the serialization of the object. (Inherited from JsonContract.)
 | OnSerialized | Gets or sets the method called after serialization of the object graph. (Inherited from JsonContract.)
 | OnSerializing | Gets or sets the method called before serialization of the object. (Inherited from JsonContract.)
 | OverrideConstructor | Gets or sets the override constructor used to create the object. This is set when a constructor is marked up using the JsonConstructor attribute.
 | ParametrizedConstructor | Gets or sets the parametrized constructor used to create the object.
 | Properties | Gets the object's properties.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UnderlyingType | Gets the underlying type for the contract. (Inherited from JsonContract.)
Inheritance Hierarchy
Object
 | JsonContract
 |  | JsonObjectContract


JsonObjectContract Constructor (underlyingType)

JsonObjectContract Constructor (underlyingType)
Namespaces ► Newtonsoft.Json.Serialization ► JsonObjectContract ► JsonObjectContract(Type)
Initializes a new instance of the JsonObjectContract class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonObjectContract(
    Type underlyingType
)
Public Sub New ( _
    underlyingType As Type _
)
public:
JsonObjectContract(
    Type^ underlyingType
)
Parameters
underlyingType (Type)
The underlying type for the contract.


MemberSerialization Property

MemberSerialization Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonObjectContract ► MemberSerialization
Gets or sets the object member serialization.
Declaration Syntax
C# Visual Basic Visual C++
public MemberSerialization MemberSerialization { get; set; }
Public Property MemberSerialization As MemberSerialization
    Get
    Set
public:
property MemberSerialization MemberSerialization {
    MemberSerialization get ();
    void set (MemberSerialization value);
}
Value
The member object serialization.


OverrideConstructor Property

OverrideConstructor Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonObjectContract ► OverrideConstructor
Gets or sets the override constructor used to create the object. This is set when a constructor is marked up using the JsonConstructor attribute.
Declaration Syntax
C# Visual Basic Visual C++
public ConstructorInfo OverrideConstructor { get; set; }
Public Property OverrideConstructor As ConstructorInfo
    Get
    Set
public:
property ConstructorInfo^ OverrideConstructor {
    ConstructorInfo^ get ();
    void set (ConstructorInfo^ value);
}
Value
The override constructor.


ParametrizedConstructor Property

ParametrizedConstructor Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonObjectContract ► ParametrizedConstructor
Gets or sets the parametrized constructor used to create the object.
Declaration Syntax
C# Visual Basic Visual C++
public ConstructorInfo ParametrizedConstructor { get; set; }
Public Property ParametrizedConstructor As ConstructorInfo
    Get
    Set
public:
property ConstructorInfo^ ParametrizedConstructor {
    ConstructorInfo^ get ();
    void set (ConstructorInfo^ value);
}
Value
The parametrized constructor.


Properties Property

Properties Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonObjectContract ► Properties
Gets the object's properties.
Declaration Syntax
C# Visual Basic Visual C++
public JsonPropertyCollection Properties { get; private set; }
Public Property Properties As JsonPropertyCollection
    Get
    Private Set
public:
property JsonPropertyCollection^ Properties {
    JsonPropertyCollection^ get ();
    private: void set (JsonPropertyCollection^ value);
}
Value
The object's properties.


JsonPrimitiveContract Class

JsonPrimitiveContract Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonPrimitiveContract
Contract details for a Type used by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonPrimitiveContract : JsonContract
Public Class JsonPrimitiveContract _
    Inherits JsonContract
public ref class JsonPrimitiveContract : public JsonContract
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonPrimitiveContract(Type) | Initializes a new instance of the JsonPrimitiveContract class.
 | Converter | Gets or sets the default JsonConverter for this contract. (Inherited from JsonContract.)
 | CreatedType | Gets or sets the type created during deserialization. (Inherited from JsonContract.)
 | DefaultCreator | Gets or sets the default creator method used to create the object. (Inherited from JsonContract.)
 | DefaultCreatorNonPublic | Gets or sets a value indicating whether [default creator non public]. (Inherited from JsonContract.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsReference | Gets or sets whether this type contract is serialized as a reference. (Inherited from JsonContract.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OnDeserialized | Gets or sets the method called immediately after deserialization of the object. (Inherited from JsonContract.)
 | OnDeserializing | Gets or sets the method called during deserialization of the object. (Inherited from JsonContract.)
 | OnError | Gets or sets the method called when an error is thrown during the serialization of the object. (Inherited from JsonContract.)
 | OnSerialized | Gets or sets the method called after serialization of the object graph. (Inherited from JsonContract.)
 | OnSerializing | Gets or sets the method called before serialization of the object. (Inherited from JsonContract.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UnderlyingType | Gets the underlying type for the contract. (Inherited from JsonContract.)
Inheritance Hierarchy
Object
 | JsonContract
 |  | JsonPrimitiveContract


JsonPrimitiveContract Constructor (underlyingType)

JsonPrimitiveContract Constructor (underlyingType)
Namespaces ► Newtonsoft.Json.Serialization ► JsonPrimitiveContract ► JsonPrimitiveContract(Type)
Initializes a new instance of the JsonPrimitiveContract class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonPrimitiveContract(
    Type underlyingType
)
Public Sub New ( _
    underlyingType As Type _
)
public:
JsonPrimitiveContract(
    Type^ underlyingType
)
Parameters
underlyingType (Type)
The underlying type for the contract.


JsonProperty Class

JsonProperty Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty
Maps a JSON property to a .NET member.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonProperty
Public Class JsonProperty
public ref class JsonProperty
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonProperty()()()() | Initializes a new instance of the JsonProperty class
 | Converter | Gets or sets the JsonConverter for the property. If set this converter takes presidence over the contract converter for the property type.
 | DefaultValue | Gets the default value.
 | DefaultValueHandling | Gets the property default value handling.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetIsSpecified | Gets or sets a predicate used to determine whether the property should be serialized.
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | Ignored | Gets a value indicating whether this JsonProperty is ignored.
 | IsReference | Gets a value indicating whether this property preserves object references.
 | MemberConverter | Gets the member converter.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | NullValueHandling | Gets the property null value handling.
 | ObjectCreationHandling | Gets the property object creation handling.
 | PropertyName | Gets the name of the property.
 | PropertyType | Gets or sets the type of the property.
 | Readable | Gets a value indicating whether this JsonProperty is readable.
 | ReferenceLoopHandling | Gets the property reference loop handling.
 | Required | Gets a value indicating whether this JsonProperty is required.
 | SetIsSpecified | Gets or sets an action used to set whether the property has been deserialized.
 | ShouldSerialize | Gets or sets a predicate used to determine whether the property should be serialize.
 | ToString()()()() | Returns a String that represents this instance. (Overrides Object.ToString()()()().)
 | TypeNameHandling | Gets or sets the type name handling.
 | ValueProvider | Gets the IValueProvider that will get and set the JsonProperty during serialization.
 | Writable | Gets a value indicating whether this JsonProperty is writable.
Inheritance Hierarchy
Object
JsonProperty


JsonProperty Constructor

JsonProperty Constructor
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► JsonProperty()()()()
Initializes a new instance of the JsonProperty class
Declaration Syntax
C# Visual Basic Visual C++
public JsonProperty()
Public Sub New
public:
JsonProperty()


Converter Property

Converter Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► Converter
Gets or sets the JsonConverter for the property. If set this converter takes presidence over the contract converter for the property type.
Declaration Syntax
C# Visual Basic Visual C++
public JsonConverter Converter { get; set; }
Public Property Converter As JsonConverter
    Get
    Set
public:
property JsonConverter^ Converter {
    JsonConverter^ get ();
    void set (JsonConverter^ value);
}
Value
The converter.


DefaultValue Property

DefaultValue Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► DefaultValue
Gets the default value.
Declaration Syntax
C# Visual Basic Visual C++
public Object DefaultValue { get; set; }
Public Property DefaultValue As Object
    Get
    Set
public:
property Object^ DefaultValue {
    Object^ get ();
    void set (Object^ value);
}
Value
The default value.


DefaultValueHandling Property

DefaultValueHandling Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► DefaultValueHandling
Gets the property default value handling.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<DefaultValueHandling> DefaultValueHandling { get; set; }
Public Property DefaultValueHandling As Nullable(Of DefaultValueHandling)
    Get
    Set
public:
property Nullable<DefaultValueHandling> DefaultValueHandling {
    Nullable<DefaultValueHandling> get ();
    void set (Nullable<DefaultValueHandling> value);
}
Value
The default value handling.


GetIsSpecified Property

GetIsSpecified Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► GetIsSpecified
Gets or sets a predicate used to determine whether the property should be serialized.
Declaration Syntax
C# Visual Basic Visual C++
public Predicate<Object> GetIsSpecified { get; set; }
Public Property GetIsSpecified As Predicate(Of Object)
    Get
    Set
public:
property Predicate<Object^>^ GetIsSpecified {
    Predicate<Object^>^ get ();
    void set (Predicate<Object^>^ value);
}
Value
A predicate used to determine whether the property should be serialized.


Ignored Property

Ignored Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► Ignored
Gets a value indicating whether this JsonProperty is ignored.
Declaration Syntax
C# Visual Basic Visual C++
public bool Ignored { get; set; }
Public Property Ignored As Boolean
    Get
    Set
public:
property bool Ignored {
    bool get ();
    void set (bool value);
}
Value
true if ignored; otherwise, false.


IsReference Property

IsReference Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► IsReference
Gets a value indicating whether this property preserves object references.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<bool> IsReference { get; set; }
Public Property IsReference As Nullable(Of Boolean)
    Get
    Set
public:
property Nullable<bool> IsReference {
    Nullable<bool> get ();
    void set (Nullable<bool> value);
}
Value
true if this instance is reference; otherwise, false.


MemberConverter Property

MemberConverter Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► MemberConverter
Gets the member converter.
Declaration Syntax
C# Visual Basic Visual C++
public JsonConverter MemberConverter { get; set; }
Public Property MemberConverter As JsonConverter
    Get
    Set
public:
property JsonConverter^ MemberConverter {
    JsonConverter^ get ();
    void set (JsonConverter^ value);
}
Value
The member converter.


NullValueHandling Property

NullValueHandling Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► NullValueHandling
Gets the property null value handling.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<NullValueHandling> NullValueHandling { get; set; }
Public Property NullValueHandling As Nullable(Of NullValueHandling)
    Get
    Set
public:
property Nullable<NullValueHandling> NullValueHandling {
    Nullable<NullValueHandling> get ();
    void set (Nullable<NullValueHandling> value);
}
Value
The null value handling.


ObjectCreationHandling Property

ObjectCreationHandling Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► ObjectCreationHandling
Gets the property object creation handling.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<ObjectCreationHandling> ObjectCreationHandling { get; set; }
Public Property ObjectCreationHandling As Nullable(Of ObjectCreationHandling)
    Get
    Set
public:
property Nullable<ObjectCreationHandling> ObjectCreationHandling {
    Nullable<ObjectCreationHandling> get ();
    void set (Nullable<ObjectCreationHandling> value);
}
Value
The object creation handling.


PropertyName Property

PropertyName Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► PropertyName
Gets the name of the property.
Declaration Syntax
C# Visual Basic Visual C++
public string PropertyName { get; set; }
Public Property PropertyName As String
    Get
    Set
public:
property String^ PropertyName {
    String^ get ();
    void set (String^ value);
}
Value
The name of the property.


PropertyType Property

PropertyType Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► PropertyType
Gets or sets the type of the property.
Declaration Syntax
C# Visual Basic Visual C++
public Type PropertyType { get; set; }
Public Property PropertyType As Type
    Get
    Set
public:
property Type^ PropertyType {
    Type^ get ();
    void set (Type^ value);
}
Value
The type of the property.


Readable Property

Readable Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► Readable
Gets a value indicating whether this JsonProperty is readable.
Declaration Syntax
C# Visual Basic Visual C++
public bool Readable { get; set; }
Public Property Readable As Boolean
    Get
    Set
public:
property bool Readable {
    bool get ();
    void set (bool value);
}
Value
true if readable; otherwise, false.


ReferenceLoopHandling Property

ReferenceLoopHandling Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► ReferenceLoopHandling
Gets the property reference loop handling.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<ReferenceLoopHandling> ReferenceLoopHandling { get; set; }
Public Property ReferenceLoopHandling As Nullable(Of ReferenceLoopHandling)
    Get
    Set
public:
property Nullable<ReferenceLoopHandling> ReferenceLoopHandling {
    Nullable<ReferenceLoopHandling> get ();
    void set (Nullable<ReferenceLoopHandling> value);
}
Value
The reference loop handling.


Required Property

Required Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► Required
Gets a value indicating whether this JsonProperty is required.
Declaration Syntax
C# Visual Basic Visual C++
public Required Required { get; set; }
Public Property Required As Required
    Get
    Set
public:
property Required Required {
    Required get ();
    void set (Required value);
}
Value
A value indicating whether this JsonProperty is required.


SetIsSpecified Property

SetIsSpecified Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► SetIsSpecified
Gets or sets an action used to set whether the property has been deserialized.
Declaration Syntax
C# Visual Basic Visual C++
public Action SetIsSpecified { get; set; }
Public Property SetIsSpecified As Action
    Get
    Set
public:
property Action^ SetIsSpecified {
    Action^ get ();
    void set (Action^ value);
}
Value
An action used to set whether the property has been deserialized.


ShouldSerialize Property

ShouldSerialize Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► ShouldSerialize
Gets or sets a predicate used to determine whether the property should be serialize.
Declaration Syntax
C# Visual Basic Visual C++
public Predicate<Object> ShouldSerialize { get; set; }
Public Property ShouldSerialize As Predicate(Of Object)
    Get
    Set
public:
property Predicate<Object^>^ ShouldSerialize {
    Predicate<Object^>^ get ();
    void set (Predicate<Object^>^ value);
}
Value
A predicate used to determine whether the property should be serialize.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► ToString()()()()
Returns a String that represents this instance.
Declaration Syntax
C# Visual Basic Visual C++
public override string ToString()
Public Overrides Function ToString As String
public:
virtual String^ ToString() override
Return Value
A String that represents this instance.


TypeNameHandling Property

TypeNameHandling Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► TypeNameHandling
Gets or sets the type name handling.
Declaration Syntax
C# Visual Basic Visual C++
public Nullable<TypeNameHandling> TypeNameHandling { get; set; }
Public Property TypeNameHandling As Nullable(Of TypeNameHandling)
    Get
    Set
public:
property Nullable<TypeNameHandling> TypeNameHandling {
    Nullable<TypeNameHandling> get ();
    void set (Nullable<TypeNameHandling> value);
}
Value
The type name handling.


ValueProvider Property

ValueProvider Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► ValueProvider
Gets the IValueProvider that will get and set the JsonProperty during serialization.
Declaration Syntax
C# Visual Basic Visual C++
public IValueProvider ValueProvider { get; set; }
Public Property ValueProvider As IValueProvider
    Get
    Set
public:
property IValueProvider^ ValueProvider {
    IValueProvider^ get ();
    void set (IValueProvider^ value);
}
Value
The IValueProvider that will get and set the JsonProperty during serialization.


Writable Property

Writable Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonProperty ► Writable
Gets a value indicating whether this JsonProperty is writable.
Declaration Syntax
C# Visual Basic Visual C++
public bool Writable { get; set; }
Public Property Writable As Boolean
    Get
    Set
public:
property bool Writable {
    bool get ();
    void set (bool value);
}
Value
true if writable; otherwise, false.


JsonPropertyCollection Class

JsonPropertyCollection Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonPropertyCollection
A collection of JsonProperty objects.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonPropertyCollection : KeyedCollection<string, JsonProperty>
Public Class JsonPropertyCollection _
    Inherits KeyedCollection(Of String, JsonProperty)
public ref class JsonPropertyCollection : public KeyedCollection<String^, JsonProperty^>
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonPropertyCollection(Type) | Initializes a new instance of the JsonPropertyCollection class.
 | Add(T) | Adds an object to the end of the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | AddProperty(JsonProperty) | Adds a JsonProperty object.
 | ChangeItemKey(TItem, TKey) | Changes the key associated with the specified element in the lookup dictionary. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | Clear()()()() | Removes all elements from the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | ClearItems()()()() | Removes all elements from the KeyedCollection<(Of <(<'TKey, TItem>)>)>. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | Comparer | Gets the generic equality comparer that is used to determine equality of keys in the collection. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | Contains(TKey) | Determines whether the collection contains an element with the specified key. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | Contains(T) | Determines whether an element is in the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | CopyTo(array<T>[]()[][], Int32) | Copies the entire Collection<(Of <(<'T>)>)> to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | Count | Gets the number of elements actually contained in the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | Dictionary | Gets the lookup dictionary of the KeyedCollection<(Of <(<'TKey, TItem>)>)>. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetClosestMatchProperty(String) | Gets the closest matching JsonProperty object. First attempts to get an exact case match of propertyName and then a case insensitive match.
 | GetEnumerator()()()() | Returns an enumerator that iterates through the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetKeyForItem(JsonProperty) | When implemented in a derived class, extracts the key from the specified element. (Overrides KeyedCollection <(Of <(<' String, JsonProperty >)>)>.GetKeyForItem(TItem).)
 | GetProperty(String, StringComparison) | Gets a property by property name.
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IndexOf(T) | Searches for the specified object and returns the zero-based index of the first occurrence within the entire Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | Insert(Int32, T) | Inserts an element into the Collection<(Of <(<'T>)>)> at the specified index. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | InsertItem(Int32, TItem) | Inserts an element into the KeyedCollection<(Of <(<'TKey, TItem>)>)> at the specified index. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | Item[([( TKey])]) | Gets the element with the specified key. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | Item[([( Int32])]) | Gets or sets the element at the specified index. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | Items | Gets a IList<(Of <(<'T>)>)> wrapper around the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | Remove(TKey) | Removes the element with the specified key from the KeyedCollection<(Of <(<'TKey, TItem>)>)>. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | Remove(T) | Removes the first occurrence of a specific object from the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | RemoveAt(Int32) | Removes the element at the specified index of the Collection<(Of <(<'T>)>)>. (Inherited from Collection <(Of <(<' JsonProperty >)>)>.)
 | RemoveItem(Int32) | Removes the element at the specified index of the KeyedCollection<(Of <(<'TKey, TItem>)>)>. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | SetItem(Int32, TItem) | Replaces the item at the specified index with the specified item. (Inherited from KeyedCollection <(Of <(<' String, JsonProperty >)>)>.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
 | Collection <(Of <(<' JsonProperty >)>)>
 |  | KeyedCollection <(Of <(<' String, JsonProperty >)>)>
 |  |  | JsonPropertyCollection


JsonPropertyCollection Constructor (type)

JsonPropertyCollection Constructor (type)
Namespaces ► Newtonsoft.Json.Serialization ► JsonPropertyCollection ► JsonPropertyCollection(Type)
Initializes a new instance of the JsonPropertyCollection class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonPropertyCollection(
    Type type
)
Public Sub New ( _
    type As Type _
)
public:
JsonPropertyCollection(
    Type^ type
)
Parameters
type (Type)
The type.


AddProperty Method (property)

AddProperty Method (property)
Namespaces ► Newtonsoft.Json.Serialization ► JsonPropertyCollection ► AddProperty(JsonProperty)
Adds a JsonProperty object.
Declaration Syntax
C# Visual Basic Visual C++
public void AddProperty(
    JsonProperty property
)
Public Sub AddProperty ( _
    property As JsonProperty _
)
public:
void AddProperty(
    JsonProperty^ property
)
Parameters
property (JsonProperty)
The property to add to the collection.


GetClosestMatchProperty Method (propertyName)

GetClosestMatchProperty Method (propertyName)
Namespaces ► Newtonsoft.Json.Serialization ► JsonPropertyCollection ► GetClosestMatchProperty(String)
Gets the closest matching JsonProperty object. First attempts to get an exact case match of propertyName and then a case insensitive match.
Declaration Syntax
C# Visual Basic Visual C++
public JsonProperty GetClosestMatchProperty(
    string propertyName
)
Public Function GetClosestMatchProperty ( _
    propertyName As String _
) As JsonProperty
public:
JsonProperty^ GetClosestMatchProperty(
    String^ propertyName
)
Parameters
propertyName (String)
Name of the property.
Return Value
A matching property if found.


GetKeyForItem Method (item)

GetKeyForItem Method (item)
Namespaces ► Newtonsoft.Json.Serialization ► JsonPropertyCollection ► GetKeyForItem(JsonProperty)
When implemented in a derived class, extracts the key from the specified element.
Declaration Syntax
C# Visual Basic Visual C++
protected override string GetKeyForItem(
    JsonProperty item
)
Protected Overrides Function GetKeyForItem ( _
    item As JsonProperty _
) As String
protected:
virtual String^ GetKeyForItem(
    JsonProperty^ item
) override
Parameters
item (JsonProperty)
The element from which to extract the key.
Return Value
The key for the specified element.


GetProperty Method (propertyName, comparisonType)

GetProperty Method (propertyName, comparisonType)
Namespaces ► Newtonsoft.Json.Serialization ► JsonPropertyCollection ► GetProperty(String, StringComparison)
Gets a property by property name.
Declaration Syntax
C# Visual Basic Visual C++
public JsonProperty GetProperty(
    string propertyName,
    StringComparison comparisonType
)
Public Function GetProperty ( _
    propertyName As String, _
    comparisonType As StringComparison _
) As JsonProperty
public:
JsonProperty^ GetProperty(
    String^ propertyName,
    StringComparison comparisonType
)
Parameters
propertyName (String)
The name of the property to get.
comparisonType (StringComparison)
Type property name string comparison.
Return Value
A matching property if found.


JsonStringContract Class

JsonStringContract Class
Namespaces ► Newtonsoft.Json.Serialization ► JsonStringContract
Contract details for a Type used by the JsonSerializer.
Declaration Syntax
C# Visual Basic Visual C++
public class JsonStringContract : JsonContract
Public Class JsonStringContract _
    Inherits JsonContract
public ref class JsonStringContract : public JsonContract
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | JsonStringContract(Type) | Initializes a new instance of the JsonStringContract class.
 | Converter | Gets or sets the default JsonConverter for this contract. (Inherited from JsonContract.)
 | CreatedType | Gets or sets the type created during deserialization. (Inherited from JsonContract.)
 | DefaultCreator | Gets or sets the default creator method used to create the object. (Inherited from JsonContract.)
 | DefaultCreatorNonPublic | Gets or sets a value indicating whether [default creator non public]. (Inherited from JsonContract.)
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsReference | Gets or sets whether this type contract is serialized as a reference. (Inherited from JsonContract.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | OnDeserialized | Gets or sets the method called immediately after deserialization of the object. (Inherited from JsonContract.)
 | OnDeserializing | Gets or sets the method called during deserialization of the object. (Inherited from JsonContract.)
 | OnError | Gets or sets the method called when an error is thrown during the serialization of the object. (Inherited from JsonContract.)
 | OnSerialized | Gets or sets the method called after serialization of the object graph. (Inherited from JsonContract.)
 | OnSerializing | Gets or sets the method called before serialization of the object. (Inherited from JsonContract.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | UnderlyingType | Gets the underlying type for the contract. (Inherited from JsonContract.)
Inheritance Hierarchy
Object
 | JsonContract
 |  | JsonStringContract


JsonStringContract Constructor (underlyingType)

JsonStringContract Constructor (underlyingType)
Namespaces ► Newtonsoft.Json.Serialization ► JsonStringContract ► JsonStringContract(Type)
Initializes a new instance of the JsonStringContract class.
Declaration Syntax
C# Visual Basic Visual C++
public JsonStringContract(
    Type underlyingType
)
Public Sub New ( _
    underlyingType As Type _
)
public:
JsonStringContract(
    Type^ underlyingType
)
Parameters
underlyingType (Type)
The underlying type for the contract.


ObjectConstructor(T) Delegate

ObjectConstructor<(Of <(<'T>)>)> Delegate
Namespaces ► Newtonsoft.Json.Serialization ► ObjectConstructor<(Of <(<'T>)>)>
Represents a method that constructs an object.
Declaration Syntax
C# Visual Basic Visual C++
public delegate Object ObjectConstructor<T>(
    params Object[] args
)

Public Delegate Function ObjectConstructor(Of T) ( _
    ParamArray args As Object() _
) As Object
generic<typename T>
public delegate Object^ ObjectConstructor(
    ... array<Object^>^ args
)
Generic Template Parameters
T

[Missing <typeparam name="T"/> documentation for "T:Newtonsoft.Json.Serialization.ObjectConstructor`1"]

Parameters
args (array< Object >[]()[][])


OnErrorAttribute Class

OnErrorAttribute Class
Namespaces ► Newtonsoft.Json.Serialization ► OnErrorAttribute
When applied to a method, specifies that the method is called when an error occurs serializing an object.
Declaration Syntax
C# Visual Basic Visual C++
public sealed class OnErrorAttribute : Attribute
Public NotInheritable Class OnErrorAttribute _
    Inherits Attribute
public ref class OnErrorAttribute sealed : public Attribute
Members
All Members | Constructors | Methods | Properties
Public Protected |  | Instance Static |  | Declared Inherited
Icon | Member | Description
 | OnErrorAttribute()()()() | Initializes a new instance of the OnErrorAttribute class
 | Equals(Object) | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Returns the hash code for this instance. (Inherited from Attribute.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | IsDefaultAttribute()()()() | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
 | Match(Object) | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
 | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
Inheritance Hierarchy
Object
 | Attribute
 |  | OnErrorAttribute


OnErrorAttribute Constructor

OnErrorAttribute Constructor
Namespaces ► Newtonsoft.Json.Serialization ► OnErrorAttribute ► OnErrorAttribute()()()()
Initializes a new instance of the OnErrorAttribute class
Declaration Syntax
C# Visual Basic Visual C++
public OnErrorAttribute()
Public Sub New
public:
OnErrorAttribute()


ReflectionValueProvider Class

ReflectionValueProvider Class
Namespaces ► Newtonsoft.Json.Serialization ► ReflectionValueProvider
Get and set values for a MemberInfo using reflection.
Declaration Syntax
C# Visual Basic Visual C++
public class ReflectionValueProvider : IValueProvider
Public Class ReflectionValueProvider _
    Implements IValueProvider
public ref class ReflectionValueProvider : IValueProvider
Members
All Members | Constructors | Methods
Public Protected |  | Instance Static | Declared Inherited
Icon | Member | Description
 | ReflectionValueProvider(MemberInfo) | Initializes a new instance of the ReflectionValueProvider class.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
 | Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
 | GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.)
 | GetType()()()() | Gets the Type of the current instance. (Inherited from Object.)
 | GetValue(Object) | Gets the value.
 | MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
 | SetValue(Object, Object) | Sets the value.
 | ToString()()()() | Returns a String that represents the current Object. (Inherited from Object.)
Inheritance Hierarchy
Object
ReflectionValueProvider


ReflectionValueProvider Constructor (memberInfo)

ReflectionValueProvider Constructor (memberInfo)
Namespaces ► Newtonsoft.Json.Serialization ► ReflectionValueProvider ► ReflectionValueProvider(MemberInfo)
Initializes a new instance of the ReflectionValueProvider class.
Declaration Syntax
C# Visual Basic Visual C++
public ReflectionValueProvider(
    MemberInfo memberInfo
)
Public Sub New ( _
    memberInfo As MemberInfo _
)
public:
ReflectionValueProvider(
    MemberInfo^ memberInfo
)
Parameters
memberInfo (MemberInfo)
The member info.


GetValue Method (target)

GetValue Method (target)
Namespaces ► Newtonsoft.Json.Serialization ► ReflectionValueProvider ► GetValue(Object)
Gets the value.
Declaration Syntax
C# Visual Basic Visual C++
public Object GetValue(
    Object target
)
Public Function GetValue ( _
    target As Object _
) As Object
public:
virtual Object^ GetValue(
    Object^ target
) sealed
Parameters
target (Object)
The target to get the value from.
Return Value
The value.


SetValue Method (target, value)

SetValue Method (target, value)
Namespaces ► Newtonsoft.Json.Serialization ► ReflectionValueProvider ► SetValue(Object, Object)
Sets the value.
Declaration Syntax
C# Visual Basic Visual C++
public void SetValue(
    Object target,
    Object value
)
Public Sub SetValue ( _
    target As Object, _
    value As Object _
)
public:
virtual void SetValue(
    Object^ target,
    Object^ value
) sealed
Parameters
target (Object)
The target to set the value on.
value (Object)
The value to set on the target.


SetToken Method

SetToken Method
Namespaces ► Newtonsoft.Json.Bson ► BsonReader ► SetToken()()()()
Members
Icon | Member | Description
 | SetToken(JsonToken) | Sets the current token.
 | SetToken(JsonToken, Object) | Sets the current token and value.


WriteEnd Method

WriteEnd Method
Namespaces ► Newtonsoft.Json.Bson ► BsonWriter ► WriteEnd()()()()
Members
Icon | Member | Description
 | WriteEnd(JsonToken) | Writes the end. (Overrides JsonWriter.WriteEnd(JsonToken).)
 | WriteEnd()()()() | Writes the end of the current Json object or array.


SetToken Method

SetToken Method
Namespaces ► Newtonsoft.Json ► JsonTextReader ► SetToken()()()()
Members
Icon | Member | Description
 | SetToken(JsonToken) | Sets the current token.
 | SetToken(JsonToken, Object) | Sets the current token and value.


WriteEnd Method

WriteEnd Method
Namespaces ► Newtonsoft.Json ► JsonTextWriter ► WriteEnd()()()()
Members
Icon | Member | Description
 | WriteEnd(JsonToken) | Writes the specified end token. (Overrides JsonWriter.WriteEnd(JsonToken).)
 | WriteEnd()()()() | Writes the end of the current Json object or array.


SetToken Method

SetToken Method
Namespaces ► Newtonsoft.Json ► JsonValidatingReader ► SetToken()()()()
Members
Icon | Member | Description
 | SetToken(JsonToken) | Sets the current token.
 | SetToken(JsonToken, Object) | Sets the current token and value.


GetChildProperties Method

GetChildProperties Method
Namespaces ► Newtonsoft.Json.Linq.ComponentModel ► JPropertyDescriptor ► GetChildProperties()()()()
Members
Icon | Member | Description
 | GetChildProperties()()()() | Returns the default PropertyDescriptorCollection.
 | GetChildProperties(array<Attribute>[]()[][]) | Returns a PropertyDescriptorCollection using a specified array of attributes as a filter.
 | GetChildProperties(Object) | Returns a PropertyDescriptorCollection for a given object.
 | GetChildProperties(Object, array<Attribute>[]()[][]) | Returns a PropertyDescriptorCollection for a given object using a specified array of attributes as a filter.


Children Method

Children Method
Namespaces ► Newtonsoft.Json.Linq ► IJEnumerable<(Of <(<'T>)>)> ► Children()()()()
Members
Icon | Member | Description
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection.
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection.


GetEnumerator Method

GetEnumerator Method
Namespaces ► Newtonsoft.Json.Linq ► IJEnumerable<(Of <(<'T>)>)> ► GetEnumerator()()()()
Members
Icon | Member | Description
 | GetEnumerator()()()() | Returns an enumerator that iterates through the collection.
 | GetEnumerator()()()() | Returns an enumerator that iterates through a collection.


Add Method

Add Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Add()()()()
Members
Icon | Member | Description
 | Add(JToken) | Adds an item to the ICollection<(Of <(<'T>)>)>.
 | Add(Object) | Adds the specified content as children of this JToken.


Ancestors Method

Ancestors Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Ancestors()()()()
Members
Icon | Member | Description
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token.
 | Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the ancestors of every token in the source collection.


AsJEnumerable Method

AsJEnumerable Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► AsJEnumerable()()()()
Members
Icon | Member | Description
 | AsJEnumerable(IEnumerable<(Of <<'(JToken>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.


Children Method

Children Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Children()()()()
Members
Icon | Member | Description
 | Children()()()() | Returns a collection of the child tokens of this token, in document order. (Overrides JToken.Children()()()().)
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection.
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection.


Remove Method

Remove Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Remove()()()()
Members
Icon | Member | Description
 | Remove(JToken) | Removes the first occurrence of a specific object from the ICollection<(Of <(<'T>)>)>.
 | Remove()()()() | Removes this token from its parent.


SelectToken Method

SelectToken Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► SelectToken()()()()
Members
Icon | Member | Description
 | SelectToken(String) | Selects the token that matches the object path.
 | SelectToken(String, Boolean) | Selects the token that matches the object path.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► ToString()()()()
Members
Icon | Member | Description
 | ToString()()()() | Returns the indented JSON for this token. (Overrides Object.ToString()()()().)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters.


Validate Method

Validate Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Validate()()()()
Members
Icon | Member | Description
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.


Value Method

Value Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Value()()()()
Members
Icon | Member | Description
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type.
 | Value<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Converts the value.
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value.


Values Method

Values Method
Namespaces ► Newtonsoft.Json.Linq ► JArray ► Values()()()()
Members
Icon | Member | Description
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order. (Overrides JToken.Values<(Of <<'(T>)>>)()()()().)
 | Values(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of child values of every object in the source collection with the given key.
 | Values(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of child values of every object in the source collection.
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of converted child values of every object in the source collection with the given key.


SelectToken Method

SelectToken Method
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► SelectToken()()()()
Members
Icon | Member | Description
 | SelectToken(String) | Selects the token that matches the object path.
 | SelectToken(String, Boolean) | Selects the token that matches the object path.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► ToString()()()()
Members
Icon | Member | Description
 | ToString()()()() | Returns the indented JSON for this token. (Overrides Object.ToString()()()().)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters.


Validate Method

Validate Method
Namespaces ► Newtonsoft.Json.Linq ► JConstructor ► Validate()()()()
Members
Icon | Member | Description
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.


Ancestors Method

Ancestors Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Ancestors()()()()
Members
Icon | Member | Description
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token.
 | Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the ancestors of every token in the source collection.


AsJEnumerable Method

AsJEnumerable Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► AsJEnumerable()()()()
Members
Icon | Member | Description
 | AsJEnumerable(IEnumerable<(Of <<'(JToken>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.


Children Method

Children Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Children()()()()
Members
Icon | Member | Description
 | Children()()()() | Returns a collection of the child tokens of this token, in document order. (Overrides JToken.Children()()()().)
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection.
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection.


SelectToken Method

SelectToken Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► SelectToken()()()()
Members
Icon | Member | Description
 | SelectToken(String) | Selects the token that matches the object path.
 | SelectToken(String, Boolean) | Selects the token that matches the object path.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► ToString()()()()
Members
Icon | Member | Description
 | ToString()()()() | Returns the indented JSON for this token. (Overrides Object.ToString()()()().)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters.


Validate Method

Validate Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Validate()()()()
Members
Icon | Member | Description
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.


Value Method

Value Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Value()()()()
Members
Icon | Member | Description
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type.
 | Value<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Converts the value.
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value.


Values Method

Values Method
Namespaces ► Newtonsoft.Json.Linq ► JContainer ► Values()()()()
Members
Icon | Member | Description
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order. (Overrides JToken.Values<(Of <<'(T>)>>)()()()().)
 | Values(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of child values of every object in the source collection with the given key.
 | Values(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of child values of every object in the source collection.
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of converted child values of every object in the source collection with the given key.


Children Method

Children Method
Namespaces ► Newtonsoft.Json.Linq ► JEnumerable<(Of <(<'T>)>)> ► Children()()()()
Members
Icon | Member | Description
 | Children<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of child tokens of every array in the source collection.
 | Children<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of converted child tokens of every array in the source collection.


Add Method

Add Method
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Add()()()()
Members
Icon | Member | Description
 | Add(String, JToken) | Adds the specified property name.
 | Add(Object) | Adds the specified content as children of this JToken.


Remove Method

Remove Method
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Remove()()()()
Members
Icon | Member | Description
 | Remove(String) | Removes the property with the specified name.
 | Remove()()()() | Removes this token from its parent.


SelectToken Method

SelectToken Method
Namespaces ► Newtonsoft.Json.Linq ► JObject ► SelectToken()()()()
Members
Icon | Member | Description
 | SelectToken(String) | Selects the token that matches the object path.
 | SelectToken(String, Boolean) | Selects the token that matches the object path.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JObject ► ToString()()()()
Members
Icon | Member | Description
 | ToString()()()() | Returns the indented JSON for this token. (Overrides Object.ToString()()()().)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters.


Validate Method

Validate Method
Namespaces ► Newtonsoft.Json.Linq ► JObject ► Validate()()()()
Members
Icon | Member | Description
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.


SelectToken Method

SelectToken Method
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► SelectToken()()()()
Members
Icon | Member | Description
 | SelectToken(String) | Selects the token that matches the object path.
 | SelectToken(String, Boolean) | Selects the token that matches the object path.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► ToString()()()()
Members
Icon | Member | Description
 | ToString()()()() | Returns the indented JSON for this token. (Overrides Object.ToString()()()().)
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters.


Validate Method

Validate Method
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► Validate()()()()
Members
Icon | Member | Description
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.


Value Property

Value Property
Namespaces ► Newtonsoft.Json.Linq ► JProperty ► Value
Members
Icon | Member | Description
 | Value | Gets or sets the property value.
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type.


Equals Method

Equals Method
Namespaces ► Newtonsoft.Json.Linq ► JRaw ► Equals()()()()
Members
Icon | Member | Description
 | Equals(JValue) | Indicates whether the current object is equal to another object of the same type.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Overrides Object.Equals(Object).)


SelectToken Method

SelectToken Method
Namespaces ► Newtonsoft.Json.Linq ► JRaw ► SelectToken()()()()
Members
Icon | Member | Description
 | SelectToken(String) | Selects the token that matches the object path.
 | SelectToken(String, Boolean) | Selects the token that matches the object path.


ToString Method

ToString Method
Namespaces ► Newtonsoft.Json.Linq ► JRaw ► ToString()()()()
Members
Icon | Member | Description
 | ToString()()()() | Returns a String that represents this instance. (Overrides JToken.ToString()()()().)
 | ToString(String) | Returns a String that represents this instance.
 | ToString(IFormatProvider) | Returns a String that represents this instance.
 | ToString(String, IFormatProvider) | Returns a String that represents this instance.
 | ToString(Formatting, array<JsonConverter>[]()[][]) | Returns the JSON for this token using the given formatting and converters.


Validate Method

Validate Method
Namespaces ► Newtonsoft.Json.Linq ► JRaw ► Validate()()()()
Members
Icon | Member | Description
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.


Value Property

Value Property
Namespaces ► Newtonsoft.Json.Linq ► JRaw ► Value
Members
Icon | Member | Description
 | Value | Gets or sets the underlying token value.
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type.


Ancestors Method

Ancestors Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Ancestors()()()()
Members
Icon | Member | Description
 | Ancestors()()()() | Returns a collection of the ancestor tokens of this token.
 | Ancestors<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns a collection of tokens that contains the ancestors of every token in the source collection.


AsJEnumerable Method

AsJEnumerable Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► AsJEnumerable()()()()
Members
Icon | Member | Description
 | AsJEnumerable(IEnumerable<(Of <<'(JToken>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.
 | AsJEnumerable<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) | Returns the input typed as IJEnumerable<(Of <(<'T>)>)>.


Validate Method

Validate Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Validate()()()()
Members
Icon | Member | Description
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.


Value Method

Value Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Value()()()()
Members
Icon | Member | Description
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type.
 | Value<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>)) | Converts the value.
 | Value<(Of <<'(T, U>)>>)(IEnumerable<(Of <<'(T>)>>)) | Converts the value.


Values Method

Values Method
Namespaces ► Newtonsoft.Json.Linq ► JToken ► Values()()()()
Members
Icon | Member | Description
 | Values<(Of <<'(T>)>>)()()()() | Returns a collection of the child values of this token, in document order.
 | Values(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of child values of every object in the source collection with the given key.
 | Values(IEnumerable<(Of <<'(JToken>)>>)) | Returns a collection of child values of every object in the source collection.
 | Values<(Of <<'(U>)>>)(IEnumerable<(Of <<'(JToken>)>>), Object) | Returns a collection of converted child values of every object in the source collection with the given key.


Equals Method

Equals Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenEqualityComparer ► Equals()()()()
Members
Icon | Member | Description
 | Equals(JToken, JToken) | Determines whether the specified objects are equal.
 | Equals(Object) | Determines whether the specified Object is equal to the current Object.


GetHashCode Method

GetHashCode Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenEqualityComparer ► GetHashCode()()()()
Members
Icon | Member | Description
 | GetHashCode(JToken) | Returns a hash code for the specified object.
 | GetHashCode()()()() | Serves as a hash function for a particular type.


SetToken Method

SetToken Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenReader ► SetToken()()()()
Members
Icon | Member | Description
 | SetToken(JsonToken) | Sets the current token.
 | SetToken(JsonToken, Object) | Sets the current token and value.


WriteEnd Method

WriteEnd Method
Namespaces ► Newtonsoft.Json.Linq ► JTokenWriter ► WriteEnd()()()()
Members
Icon | Member | Description
 | WriteEnd(JsonToken) | Writes the end. (Overrides JsonWriter.WriteEnd(JsonToken).)
 | WriteEnd()()()() | Writes the end of the current Json object or array.


SelectToken Method

SelectToken Method
Namespaces ► Newtonsoft.Json.Linq ► JValue ► SelectToken()()()()
Members
Icon | Member | Description
 | SelectToken(String) | Selects the token that matches the object path.
 | SelectToken(String, Boolean) | Selects the token that matches the object path.


Validate Method

Validate Method
Namespaces ► Newtonsoft.Json.Linq ► JValue ► Validate()()()()
Members
Icon | Member | Description
 | Validate(JToken, JsonSchema) | Validates the specified JToken.
 | Validate(JToken, JsonSchema, ValidationEventHandler) | Validates the specified JToken.


Value Property

Value Property
Namespaces ► Newtonsoft.Json.Linq ► JValue ► Value
Members
Icon | Member | Description
 | Value | Gets or sets the underlying token value.
 | Value<(Of <<'(T>)>>)(Object) | Gets the JToken with the specified key converted to the specified type.


Contains Method

Contains Method
Namespaces ► Newtonsoft.Json.Serialization ► JsonPropertyCollection ► Contains()()()()
Members
Icon | Member | Description
 | Contains(TKey) | Determines whether the collection contains an element with the specified key.
 | Contains(T) | Determines whether an element is in the Collection<(Of <(<'T>)>)>.


Item Property

Item Property
Namespaces ► Newtonsoft.Json.Serialization ► JsonPropertyCollection ► Item
Members
Icon | Member | Description
 | Item[([( TKey])]) | Gets the element with the specified key.
 | Item[([( Int32])]) | Gets or sets the element at the specified index.


Remove Method

Remove Method
Namespaces ► Newtonsoft.Json.Serialization ► JsonPropertyCollection ► Remove()()()()
Members
Icon | Member | Description
 | Remove(TKey) | Removes the element with the specified key from the KeyedCollection<(Of <(<'TKey, TItem>)>)>.
 | Remove(T) | Removes the first occurrence of a specific object from the Collection<(Of <(<'T>)>)>.


Namespaces

Namespaces
Namespaces
Namespaces
Namespace | Description
Newtonsoft.Json | The Newtonsoft.Json namespace provides classes that are used to implement the core services of the framework.
Newtonsoft.Json.Bson | The Newtonsoft.Json.Linq namespace provides classes that are used to implement BSON.
Newtonsoft.Json.Converters | The Newtonsoft.Json.Converters namespace provides classes that inherit from JsonConverter.
Newtonsoft.Json.Linq | The Newtonsoft.Json.Linq namespace provides classes that are used to implement LINQ to JSON.
Newtonsoft.Json.Linq.ComponentModel | The Newtonsoft.Json.Linq.ComponentModel namespace provides classes for LINQ to JSON databinding.
Newtonsoft.Json.Schema | The Newtonsoft.Json.Schema namespace provides classes that are used to implement JSON schema.
Newtonsoft.Json.Serialization | The Newtonsoft.Json.Linq namespace provides classes that are used when serializing and deserializing JSON.