Skip to content

View Model data mapping: JSON.parse inconsistency #468

@BrentH-Alnico

Description

@BrentH-Alnico

Hi Boris,

When VM data is mapped, I was expecting to convert a JSON string of this form:
"HasVoted_list": "[{\"GUID\": \"51564165FA8149864D6D216391EAC4BB\", \"VoteState\": 1}]"
But, it is automatically parsed to valid array of objects...nice ;-)

However, if we apply that same logic to a JSON string of this form:
"IsHost_list": "[\"2273DC25C55777CD8BF22300E4D9E279\"]"
It is not parsed to a valid array...it remains unchanged.

Is this intentional or by design?

You can find this line of code (valid array) in the file I previously sent you, if you want to test:
"IsHost_list": ["2273DC25C55777CD8BF22300E4D9E279"]

Thanks,
Brent

UPDATE:

I think I am wrong on this...this worked with v15 but is an issue with candidates not refreshing I think...
I think I've got myself confused? ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions