IDataUnpacker.Raw Property
.NET Standard 2.x
Gets the raw string of text which contains all of the elements in the IDataUnpacker object.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Syntax
string Raw { get; }
Property Value
System.String
The raw string of text which contains all of the elements stored in the IDataUnpacker object.
It was specified in the constructor of DataUnpacker.
Examples
The following code example gets the original text of dataUnPacker object.
using SnapObjects.Data;
using System;
namespace Appeon.ApiDoc.IDataUnpackerExamples
{
public class RawExample
{
private readonly SchoolContext _context;
public RawExample(SchoolContext dataContext)
{
// Sets the data context.
_context = dataContext;
}
public void Example()
{
var packer = new DataPacker();
packer.AddValue("name", "Name1");
packer.AddValue("address", "Address1");
var json = packer.GetTextString(DataFormat.Json);
// Specifies the data format to Json
var dataUnPacker = new DataUnpacker(json, DataFormat.Json);
// Gets the original text of dataUnPacker object
var rawvalue = dataUnPacker.Raw;
Console.WriteLine("Raw Values: {0}", rawvalue);
/* This code example produces the following output:
Raw Values: {"name":"Name1","address":"Address1"}
*/
}
}
}
Applies to
.NET Standard
2.x