serializr-fp
(De)serialize complex object graphs to/from JSON
A FP (Functional Programming) alternative to serializr, with a simpler approach for ease of use and better customization, configure (de)serialization through schema's, improving readability and maintainability.
More info about the internals and principles →
Install
npm install serializr-fp --save
Usage
; const PATIENT_SCHEMA = ; const source = id: '123' person: firstName: 'Dieter' lastName: 'Geerts' fullName: 'Dieter Geerts' dateOfBirth: '1982-10-08'; const json = PATIENT_SCHEMA;const patient = PATIENT_SCHEMA; console; console; // Or you can export functions for other modules to use,// without the need to know how (de)serialization is done. const deserializePatient = PATIENT_SCHEMAdeserialize;const serializePatient = PATIENT_SCHEMAserialize;
API
Maintainers
dietergeerts |
Contribute
All contributions welcome
Contributors
dietergeerts |