fast-json-stringify icon indicating copy to clipboard operation
fast-json-stringify copied to clipboard

refactor: move global variables into class context

Open ivan-tymoshenko opened this issue 3 years ago • 1 comments

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:

  1. Class constructor initiates all context variables, including external schemas.
  2. The build method: should build the schema serializer. You can't call the build method 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.

ivan-tymoshenko avatar Sep 07 '22 14:09 ivan-tymoshenko

Can you rebase? This now conflicts.

mcollina avatar Sep 19 '22 06:09 mcollina

Can you rebase?

mcollina avatar Oct 27 '22 07:10 mcollina

I'm going to add some changes before that.

ivan-tymoshenko avatar Oct 28 '22 09:10 ivan-tymoshenko