using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; using System.Text; namespace Newtonsoft.Json.Linq { /// /// Represents a raw JSON string. /// public class JRaw : JValue { /// /// Initializes a new instance of the class from another object. /// /// A object to copy from. public JRaw(JRaw other) : base(other) { } /// /// Initializes a new instance of the class. /// /// The raw json. public JRaw(object rawJson) : base(rawJson, JTokenType.Raw) { } /// /// Creates an instance of with the content of the reader's current token. /// /// The reader. /// An instance of with the content of the reader's current token. public static JRaw Create(JsonReader reader) { using (StringWriter sw = new StringWriter(CultureInfo.InvariantCulture)) using (JsonTextWriter jsonWriter = new JsonTextWriter(sw)) { jsonWriter.WriteToken(reader); return new JRaw(sw.ToString()); } } internal override JToken CloneToken() { return new JRaw(this); } } }