Skip to content

Make JsonObjectReader() compatible with JS collections #17

@ekuleshov

Description

@ekuleshov

When running in a browser and receiving data from other JavaScript code I'm getting JSObject types. So, I can do something like (obj.dartify() as Map).cast<String, dynamic>() and pass the dartified object to JsonObjectReader().

But when it gets to any nested maps, the tryObject() check for is-Map instance is failing on a value, which has runtime type like JsLinkedHashMap.

Not sure if there is a better way for this. But it would be neat if JsonObjectReader() could take the raw JS values.

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