Create a new JSONImpl instance
the internal buffer containing the JSON`
the offset of the data in the buffer
the number of bytes of the data in the buffer
The internal buffer
The number of bytes in the slice
The offset of the slice
Apply a delta to this JSON value to create a new value.
Convenient equivalent to:
diffusion.datatypes.JSON().deltaType(delta).apply(this, delta);
the binary delta to apply to this value
a new instance derived from applying the delta to this value
Get a copy of the array containing this value.
This value in binary form
Get a copy of the buffer containing this value.
This value in binary form
Compare this JSON value with an earlier version to create a structural json delta.
Convenient equivalent to:
this.diff(original, 'binary');
Standard JSON objects may also be provided as the value to diff instead of a JSON instance.
Example:
const delta = binaryDiff.jsonDiff({ foo : 'bar' });
the value to diff against this
a delta representing the difference between this and the provided value
Check if the Bytes are equal to a buffer slices
the buffer
the offset of the slice
the number of bytes in the slice
true if the two bytes are equal
Check if the Bytes are equal to a buffer slices
the buffer slice
true if the two bytes are equal
Get this instance's value. Use this method to access the provided data when a JSON instance is received through the API.
Example:
session.addStream('foo', diffusion.datatypes.json())
.on('value', function(path, spec, value) {
// Get the actual value from the JSON instance
const data = value.get();
});
the JSON value
Compare this JSON value with an earlier version to create a structural json delta.
Convenient equivalent to:
this.diff(original, 'json');
Standard JSON objects may also be provided as the value to diff instead of a JSON instance.
Example:
const delta = jsonValue.jsonDiff({ foo : 'bar' });
the value to diff against this
a delta representing the difference between this and the provided value
Get the number of bytes
The length of the data in bytes
Convert the objet to a JSON string
a JSON string representation of the JSON object
Convert the objet to a string
a string representation of the JSONImpl
Create a new JSON object from a raw object or a RecordV2Impl. If a RecordV2Impl is passed as argument it is simply returned.
the object to create a JSON from
the JSON created
Return the name of the data type
JSONImpl
Copyright © 2025 DiffusionData Ltd. All Rights Reserved.
Implementation of JSON object.