JRaw
Represents a raw JSON string.
using System.Globalization;
using System.IO;
using System.Runtime.CompilerServices;
namespace Newtonsoft.Json.Linq
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public class JRaw : JValue
{
public JRaw(JRaw other)
: base(other, null)
{
}
internal JRaw(JRaw other, [System.Runtime.CompilerServices.Nullable(2)] JsonCloneSettings settings)
: base(other, settings)
{
}
[System.Runtime.CompilerServices.NullableContext(2)]
public JRaw(object rawJson)
: base(rawJson, JTokenType.Raw)
{
}
public static JRaw Create(JsonReader reader)
{
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
using (JsonTextWriter jsonTextWriter = new JsonTextWriter(stringWriter)) {
jsonTextWriter.WriteToken(reader);
return new JRaw(stringWriter.ToString());
}
}
internal override JToken CloneToken([System.Runtime.CompilerServices.Nullable(2)] JsonCloneSettings settings)
{
return new JRaw(this, settings);
}
}
}