Skip to content

Deserialisation doesn't work on web #3

@windybranch

Description

@windybranch

This package doesn't work when deployed to web due to minification when compiling to JavaScript.

The package is using the Type.toString() to determine class names and parameters for deserialisation. When the code is deployed to web, at runtime it will output a minified String:

Env Output
Local Debug Closure: ({required String age, required String name}) => Person from: (...args) => context[property](...args)
Local Release Closure 'minified:pq'

See this relevant issue dart-lang/sdk#46373.

It should be made clear in the docs that this won't work on web.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions