neon icon indicating copy to clipboard operation
neon copied to clipboard

WIP: improvements & bug fixes

Open JanTvrdik opened this issue 11 years ago • 11 comments

JanTvrdik avatar Mar 31 '14 14:03 JanTvrdik

Can you split it to tests and changes in decoder?

dg avatar Apr 02 '14 12:04 dg

Oh, I've just noticed that tests failed on Travis which means that iconv('UTF-32BE', 'UTF-8//IGNORE', pack('N', $code)); is not portable.

JanTvrdik avatar Apr 02 '14 17:04 JanTvrdik

Maybe unsupported //IGNORE?

dg avatar Apr 02 '14 17:04 dg

Another JSON incompatibility:

[
    1
    ,
    2
]

(Isolated from https://github.com/php/php-src/blob/master/ext/json/tests/pass001.1.phpt)

Edit: I've got hotfix that passed all tests but I have no idea whether it is reliable.

Edit: another two:

{"A"
:"B"}
{"A":
"B"}

JanTvrdik avatar Apr 09 '14 10:04 JanTvrdik

Now all the tests passing, however the following syntax is no longer supported:

{
    "A":
    "B":
}

You now need to switch to a block mode by omitting the brackets if you want to omit values:

"A":
"B":

JanTvrdik avatar Apr 09 '14 11:04 JanTvrdik

One more issue: Neon assumes block mode on top level, where whitespaces are significant and ends up with Unexpected indentation error for the following

Assert::same( TRUE, Neon::decode("\n\t[1]") );

Edit: I've tried trimming the input string, hopefully it will not break anything.

JanTvrdik avatar Apr 09 '14 13:04 JanTvrdik

@JanTvrdik Is this still work in progress?

mishak87 avatar Nov 25 '14 17:11 mishak87

@JanTvrdik is this still valid?

dg avatar Feb 10 '15 06:02 dg

Yes, partially.

JanTvrdik avatar Feb 10 '15 21:02 JanTvrdik

@JanTvrdik can you rebase it, it is partially implemented

dg avatar Jun 25 '16 13:06 dg

rebased, but unfortunatelly not ready to merge as-is

JanTvrdik avatar Aug 07 '16 16:08 JanTvrdik