JSON Data Type in introduction part

There are only six dataypes in JSON. But listed option contains Decimal number and Floating point number instead of number. Are both numbers will be included in data type number or they are different. Please help

Hey @DEEPAK_56699, that threw me off a bit as well. I am pretty sure that JSON does not differentiate between the two - it just defines numbers which might have a decimal part. So the two options on the list are the same thing. Now, when developing an application which parses JSON, you should be able to specify whether the number will be stored as a decimal or a floating-point.

I had the same issues, number under this course, it states decimal – but when you lookup at this site, “https://www.tutorialspoint.com/json/json_data_types.htm” – it clearly shows and include decimal and floating number –
Hope this helps –
SON format supports the following data types −

S. No. Type & Description
1 Number

double- precision floating-point format in JavaScript|

double-quoted Unicode with backslash escaping|

true or false|

an ordered sequence of values|

it can be a string, a number, true or false, null etc|

an unordered collection of key:value pairs|

can be used between any pair of tokens|


1 Like

@DEEPAK_56699 what do you mean by