Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
177
rated 0 times [  183] [ 6]  / answers: 1 / hits: 65725  / 6 Years ago, fri, october 5, 2018, 12:00:00

The following object is a valid one in plain Javascript. However, if the same is added to a JSON file, the file does not pass validation. Why is that?



var message = {
senderID: [ 0x01 ],
receiverID: [ 0xFF ],
commandCode: [ 0x00, 0x05 ],
payload: [ 0xFF ]
}

More From » json

 Answers
32

JSON does not support hexadecimal numbers but they are supported in JSON5.
json5.org


[#53365] Tuesday, October 2, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kristinsonjab

Total Points: 364
Total Questions: 98
Total Answers: 98

Location: Christmas Island
Member since Mon, Oct 19, 2020
4 Years ago
kristinsonjab questions
Fri, Mar 4, 22, 00:00, 2 Years ago
Fri, Jan 22, 21, 00:00, 3 Years ago
Fri, Aug 14, 20, 00:00, 4 Years ago
;