Create JavaScript Data Format (JSDF) serialiser
Use case
Transactions require a JavaScript Data Format (JSDF) serialiser as we are no longer using JSON to serialise complex objects.
Proposed implementation
Implement a JSDF
class with a static serialise()
method.
e.g.,
JSDF.serialise([{a: 'complex'}, {deep: 'collection'}, {of: 'stuff'}, {including: new Date()}, {and: new Dog()}])
A deserialise()
method should not be necessary as JSDF deserialisation occurs at file load, either via require()
or eval()
(and is currently handled in the JSTable
class.