Skip to content

Serialize Array/List of basic types (may be also objects) only remain first item #28

@jmoyola

Description

@jmoyola

When you serialize a list of items (for example, strings), only remain in final json first item (another items are missing).
Tested with last v8 master release.

in this source part of json loaded:
"EventUpdateTypes": [
"SelectionCurrentPrizeUp",
"SelectionLifeState",
"SelectionSuspensionType"
]
when you return to reset same items in "EventUpdateTypes", only appears first item like this:
"EventUpdateTypes": [
"SelectionCurrentPrizeUp"
]

After a quick view in code, error appear in :
image
when is iterating in each children, context variable never go to next child (remain in first child always)....

for fix, must to set:
....
context = context[currentKey];

if(child!=null)
      jsonObj = child;
...

image

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