Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set explicitArray=false only for non-child node #646

Open
shoysal opened this issue May 27, 2022 · 1 comment
Open

how to set explicitArray=false only for non-child node #646

shoysal opened this issue May 27, 2022 · 1 comment

Comments

@shoysal
Copy link

shoysal commented May 27, 2022

I have a object class
payment {
details [
{
FirstName:"goo",
LastName:"foo"
},
{
FirstName:"poo",
LastName:"shoo"
}
]
}
I want details object to always be an array even if I have just 1 object in the list.
If I set explicitArray=false then if the detail has one object it converts array into an object. I am getting a error in the code as its expecting an array of object and not an object.
Is there a way to set explicitArray=false only for non-child node.

@Leonidas-from-XIV
Copy link
Owner

Leonidas-from-XIV commented May 27, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants