clugg / sm-json

A pure SourcePawn JSON encoder/decoder.
GNU General Public License v3.0
82 stars 8 forks source link

[Bug] json_decode, SM 1.11 #14

Closed budziam closed 4 years ago

budziam commented 4 years ago

Hi there, I'm facing an issue using your excellent library with SM v1.11. Using SM v1.10 everything works correctly.

JSON value:

{"id":10,"sn":[]}

Error:

json_decode: expected key string at position 16

The issue is related to an empty array entry. It doesn't fail without it. The SM build I use: https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6524-linux.tar.gz

Many, many thanks for the great work you do!

clugg commented 4 years ago

It appears that the SM1.11 compiler evaluates my convoluted conditionals a little differently to the earlier compilers. I have just released v3.0.1 which should fix the issue. Please let me know how it goes, and thanks for your report!