IJSValueReader
IJSIValueReader
is used to read data from JavaScript in custom NativeModules. It acts as a stream.
IJSIValueReader
supports the following types:
enum JSValueType {
Null,
Object,
Array,
String,
Boolean,
Int64,
Double,
};
Reference
Methods
GetNextObjectProperty()
bool GetNextObjectProperty(out string propertyName);
Returns if there is another property in the current object. If there is propertyName
will provide the name of the property.
GetNextArrayItem()
bool GetNextArrayItem()
Moves the reader to the next array item. Returns if there is another item in the array.
GetString()
string GetString();
Gets the current string value.
GetBoolean()
bool GetBoolean();
Gets the current boolean value.
GetInt64()
int64 GetInt64();
Gets the current number value as an int.
GetDouble()
double GetDouble();
Gets the current number value as a double.
Properties
ValueType
JSValueType ValueType { get; }
Returns the type of the current value.