fast-json-stringify
fast-json-stringify copied to clipboard
refactor: move global variables into class context
Through the building serializer process, different function use the same context that is stored in global. I think it would be better to share this context using the class.
Also, I separated the build function call into two different calls:
- Class constructor initiates all context variables, including external schemas.
- The
buildmethod: should build the schema serializer. You can't call thebuildmethod of the SerializerFactory with different schemas yet. I want to add this functionality, but in another PR.
The API of the library is still the same.
Can you rebase? This now conflicts.
Can you rebase?
I'm going to add some changes before that.