Skip to content

Deserialise KV component returns JValue/JToken rather than system type #18

@jackwalkernz

Description

@jackwalkernz

Hey @andrewheumann . Loving the jSwan components!

I've noticed an issue with the DeserialiseKV component.

When we deserialise a JSON object using the component (same goes for Deserialise as well), the return type is not the expected type (int, double, string, etc). Rather it is Newtonsoft.Json.Linq.JValue. It appears as though the component doesn't convert JValues to their system types and keeps the values wrapped inside the JValue wrappers. This creates weird behaviours in GH as when we feed the resultant values into native GH components, it creates unexpected computation results (subtraction doesn't work between two numbers, for example).

Please see the GH file attached in the zip below 😃

Cheers!
JSWAN_Issue8.zip

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