pichillilorenzo / jackson-js

JavaScript object serialization and deserialization library using decorators. It supports also advanced Object concepts such as polymorphism, Object identity and cyclic objects.
https://pichillilorenzo.github.io/jackson-js/latest/index.html
MIT License
90 stars 12 forks source link

Fails when client package is minified #7

Open kdubb opened 4 years ago

kdubb commented 4 years ago

Environment

Any environment that minifies code. For example, Angular production builds which use WebPack with optimization enabled.

Description

Minification should not have any effect on usage including serialization and/or deserialization.

After minification serialization/deserialization fails with the error Invalid Keyword. This can be traced to an issue with getArgumentNames and meriyah's parseScript failing to parse the minified function signature.

Also, it appears that even if the parsing succeeded the argument names would then be incorrect but I am not sure if this affects usage.

Steps to reproduce

  1. Create a class that uses JsonCreator or JsonPropertys on the constructor.
  2. Minify the class
  3. Attempt to serialize or deserialize using the minified class.
cdunford commented 4 years ago

@kdubb - I see you have a PR open for this issue; any idea what's going on with it?

niveo commented 3 years ago

the same here

kdubb commented 3 years ago

@niveo @cdunford We have a fork @outfoxx/jackson-js currently published on NPM that includes all of our open PRs.

It's looking like this great project may be abandoned.