• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ArkTS Changelog
2
3## cl.arkts.1 Change in JSON.parse() Return Value for Number.MIN_VALUE
4
5**Access Level**
6
7Public API
8
9**Reason for Change**
10
11 The static data property **Number.MIN_VALUE** represents the smallest positive number that can be represented in JavaScript, which is approximately 5e-324. This change introduces support for parsing this value in **JSON.parse()**.
12
13**Impact of the Change**
14
15This change requires application adaptation.
16
17Before the change, the return value of **Number.MIN_VALUE** parsed by **JSON.parse()** is **Infinity**.
18
19After the change, the return value of **Number.MIN_VALUE** parsed by **JSON.parse()** is **5e-324**.
20
21**Start API Level**
22
236
24
25**Change Since**
26
27OpenHarmony SDK 5.1.0.47
28
29**Key API/Component Changes**
30
31N/A
32
33**Adaptation Guide**
34
35Currently, the smallest number that **JSON.parse()** can parse is **Number.MIN_VALUE**, which is approximately 5e-324. Before this change, the smallest number that could be parsed was approximately 2.22e-308.
36
37Example:
38
39```typescript
40let res = JSON.parse('{"num":5e-324}')
41console.info(res.num)
42```
43
44Before the change, the output of this example is:
45
46```
47Infinity
48```
49
50After the change, the output of this example is:
51
52```
535e-324
54```
55