oknoorap / jsonar

:sunny: Convert JSON to PHP native Array.
MIT License
7 stars 3 forks source link

Wrong json parsing when multiple array. #18

Open rajajwaliya opened 3 years ago

rajajwaliya commented 3 years ago

hello developers, i have try to convert the php array to json using parse() methods. but i am getting the wrong result in back. please help to update this package.

`my sample array :- [[[1,2],[3,4]],[[5,6],[7,8]]]`

1) i am using arrify() to convert above json into php array. which is correct.

`php array :-  array(array(array(1,2),array(3,4)),array(array(5,6),array(7,8)))`

2) now i try to get back my original json back. but unfortunately, when i parse the php array using parse(), package gives me wrong result.

`result :- [ 1, 2, 3, 4, 5, 6, 7, 8 ]`

the actual result should be like this [[[1,2],[3,4]],[[5,6],[7,8]]]

sharevb commented 5 months ago

Hi @rajajwaliya and @oknoorap, made a fork that update dependencies and fix some bugs

@oknoorap, interested by PR of this fork ? thanks