alibaba / fastjson

FASTJSON 2.0.x has been released, faster and more secure, recommend you upgrade.
https://github.com/alibaba/fastjson2/wiki/fastjson_1_upgrade_cn
Apache License 2.0
25.69k stars 6.5k forks source link

Number leading zeroes should fail to parse #2627

Open Alanscut opened 4 years ago

Alanscut commented 4 years ago

fastjson can correctly parse the number starting with 0. However, JSON specification does not allow number leading zeroes.

XYNIK commented 4 years ago

Request Error (invalid_request)

Your request could not be processed. Request could not be handled This could be caused by a misconfiguration, or possibly a malformed request.

Transaction ID: 08dc07ba02318e4c-000000002070e806-000000005d534ae8

For assistance, contact your network support team.

On Tue, Aug 13, 2019, 9:12 AM Alanscut notifications@github.com wrote:

fastjson can correctly parse the number starting with 0. However, JSON specification does not allow number leading zeroes.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alibaba/fastjson/issues/2627?email_source=notifications&email_token=AMX2YHLZANYOYKEEACC37MDQEKXKRA5CNFSM4ILKUH6KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HE6PS3A, or mute the thread https://github.com/notifications/unsubscribe-auth/AMX2YHLXCFGD6GJXS6IAIFTQEKXKRANCNFSM4ILKUH6A .

Alanscut commented 4 years ago

hi, I don't get your idea. I just want to say fastjson shouldn't parse a number like 05 normally. I think this has nothing to do with network. JSON specification RFC 7159 says Leading zeros are not allowed.