1a1d56debSopenharmony_ci// Copyright (c) 2023 Huawei Device Co., Ltd.
2a1d56debSopenharmony_ci// Licensed under the Apache License, Version 2.0 (the "License");
3a1d56debSopenharmony_ci// you may not use this file except in compliance with the License.
4a1d56debSopenharmony_ci// You may obtain a copy of the License at
5a1d56debSopenharmony_ci//
6a1d56debSopenharmony_ci//     http://www.apache.org/licenses/LICENSE-2.0
7a1d56debSopenharmony_ci//
8a1d56debSopenharmony_ci// Unless required by applicable law or agreed to in writing, software
9a1d56debSopenharmony_ci// distributed under the License is distributed on an "AS IS" BASIS,
10a1d56debSopenharmony_ci// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11a1d56debSopenharmony_ci// See the License for the specific language governing permissions and
12a1d56debSopenharmony_ci// limitations under the License.
13a1d56debSopenharmony_ci
14a1d56debSopenharmony_cipub const LOOPS_NUM: usize = 10;
15a1d56debSopenharmony_ci
16a1d56debSopenharmony_cipub const NULL_EXAMPLE: &str = "null";
17a1d56debSopenharmony_cipub const BOOLEAN_EXAMPLE: &str = "false";
18a1d56debSopenharmony_cipub const NUMBER_EXAMPLE: &str = "12.34";
19a1d56debSopenharmony_cipub const STRING_EXAMPLE: &str = "\"Hello\"";
20a1d56debSopenharmony_cipub const ARRAY_EXAMPLE: &str = "[false,null,12.34]";
21a1d56debSopenharmony_cipub const OBJECT_EXAMPLE: &str = r#"{"key":"value"}"#;
22a1d56debSopenharmony_ci
23a1d56debSopenharmony_cipub const RFC7159_EXAMPLE1: &str = r#"
24a1d56debSopenharmony_ci{
25a1d56debSopenharmony_ci    "Image": {
26a1d56debSopenharmony_ci        "Width":  800,
27a1d56debSopenharmony_ci        "Height": 600,
28a1d56debSopenharmony_ci        "Title":  "View from 15th Floor",
29a1d56debSopenharmony_ci        "Thumbnail": {
30a1d56debSopenharmony_ci            "Url":    "http://www.example.com/image/481989943",
31a1d56debSopenharmony_ci            "Height": 125,
32a1d56debSopenharmony_ci            "Width":  100
33a1d56debSopenharmony_ci        },
34a1d56debSopenharmony_ci        "Animated" : false,
35a1d56debSopenharmony_ci        "IDs": [116, 943, 234, 38793]
36a1d56debSopenharmony_ci    }
37a1d56debSopenharmony_ci}
38a1d56debSopenharmony_ci"#;
39a1d56debSopenharmony_ci
40a1d56debSopenharmony_cipub const RFC7159_EXAMPLE2: &str = r#"
41a1d56debSopenharmony_ci[
42a1d56debSopenharmony_ci    {
43a1d56debSopenharmony_ci       "precision": "zip",
44a1d56debSopenharmony_ci       "Latitude":  37.7668,
45a1d56debSopenharmony_ci       "Longitude": -122.3959,
46a1d56debSopenharmony_ci       "Address":   "",
47a1d56debSopenharmony_ci       "City":      "SAN FRANCISCO",
48a1d56debSopenharmony_ci       "State":     "CA",
49a1d56debSopenharmony_ci       "Zip":       "94107",
50a1d56debSopenharmony_ci       "Country":   "US"
51a1d56debSopenharmony_ci    },
52a1d56debSopenharmony_ci    {
53a1d56debSopenharmony_ci       "precision": "zip",
54a1d56debSopenharmony_ci       "Latitude":  37.371991,
55a1d56debSopenharmony_ci       "Longitude": -122.026020,
56a1d56debSopenharmony_ci       "Address":   "",
57a1d56debSopenharmony_ci       "City":      "SUNNYVALE",
58a1d56debSopenharmony_ci       "State":     "CA",
59a1d56debSopenharmony_ci       "Zip":       "94085",
60a1d56debSopenharmony_ci       "Country":   "US"
61a1d56debSopenharmony_ci    }
62a1d56debSopenharmony_ci]
63a1d56debSopenharmony_ci"#;
64a1d56debSopenharmony_ci
65a1d56debSopenharmony_cipub const JSON_PARSE_TEST: &str = r#"
66a1d56debSopenharmony_ci[
67a1d56debSopenharmony_ci    {
68a1d56debSopenharmony_ci        "null1": null
69a1d56debSopenharmony_ci    },
70a1d56debSopenharmony_ci    {
71a1d56debSopenharmony_ci        "boolean1": true,
72a1d56debSopenharmony_ci        "boolean2": false
73a1d56debSopenharmony_ci    },
74a1d56debSopenharmony_ci    {
75a1d56debSopenharmony_ci        "number1": 0,
76a1d56debSopenharmony_ci        "number2": -0,
77a1d56debSopenharmony_ci        "number3": 123,
78a1d56debSopenharmony_ci        "number4": -123,
79a1d56debSopenharmony_ci        "number5": 123.456,
80a1d56debSopenharmony_ci        "number6": -123.456,
81a1d56debSopenharmony_ci        "number7": 123.456e+7,
82a1d56debSopenharmony_ci        "number8": 123.456e-7,
83a1d56debSopenharmony_ci        "number9": 123.456E+7,
84a1d56debSopenharmony_ci        "number10": 123.456E-7,
85a1d56debSopenharmony_ci        "number11": -123.456e+7,
86a1d56debSopenharmony_ci        "number12": -123.456e-7,
87a1d56debSopenharmony_ci        "number13": -123.456E+7,
88a1d56debSopenharmony_ci        "number14": -123.456E-7,
89a1d56debSopenharmony_ci        "number15": 0.0,
90a1d56debSopenharmony_ci        "number16": -0.0e+7,
91a1d56debSopenharmony_ci        "number17": 3e2
92a1d56debSopenharmony_ci    },
93a1d56debSopenharmony_ci    {
94a1d56debSopenharmony_ci        "string1": "",
95a1d56debSopenharmony_ci        "string2": "Hello World",
96a1d56debSopenharmony_ci        "string3": "abcdefghijklmnopqrstuvwxyz",
97a1d56debSopenharmony_ci        "string4": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
98a1d56debSopenharmony_ci        "string5": "0123456789",
99a1d56debSopenharmony_ci        "string6": " \b\f\n\r\t",
100a1d56debSopenharmony_ci        "string7": "\"\\\/",
101a1d56debSopenharmony_ci        "string8": "`1~!@#$%^&*()_+-={':[,]}|;.</>?",
102a1d56debSopenharmony_ci        "string9": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A"
103a1d56debSopenharmony_ci    },
104a1d56debSopenharmony_ci    {
105a1d56debSopenharmony_ci        "array1": [],
106a1d56debSopenharmony_ci        "array2": [
107a1d56debSopenharmony_ci                                     ],
108a1d56debSopenharmony_ci        "array3": [null,true,0.0,"string",[],{}],
109a1d56debSopenharmony_ci        "array4": [
110a1d56debSopenharmony_ci                null                    ,               true,           0.0           ,
111a1d56debSopenharmony_ci        "string",                            []
112a1d56debSopenharmony_ci                             ,        {}   ],
113a1d56debSopenharmony_ci        "array5": [[[[[[["nest"]]]]]]]
114a1d56debSopenharmony_ci    },
115a1d56debSopenharmony_ci    {
116a1d56debSopenharmony_ci        "object1": {},
117a1d56debSopenharmony_ci        "object2": {
118a1d56debSopenharmony_ci                                                   },
119a1d56debSopenharmony_ci        "object3": {"key1":null,"key2":true,"key3":0.0,"key4":"string","key5":[],"key6":{}},
120a1d56debSopenharmony_ci        "object4": {
121a1d56debSopenharmony_ci                "key1"                :                 null   ,       "key2"
122a1d56debSopenharmony_ci                           :                  true     ,            "key3"         :
123a1d56debSopenharmony_ci         0.0      ,      "key4":"string"            ,
124a1d56debSopenharmony_ci                       "key5":                [],          "key6":            {
125a1d56debSopenharmony_ci                                       }
126a1d56debSopenharmony_ci        },
127a1d56debSopenharmony_ci        "object5": {"nest1": {"nest2": {"nest3": {"nest4": {}}}}}
128a1d56debSopenharmony_ci    },
129a1d56debSopenharmony_ci    {
130a1d56debSopenharmony_ci        "": "key1",
131a1d56debSopenharmony_ci        "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?" : "key2"
132a1d56debSopenharmony_ci    },
133a1d56debSopenharmony_ci    {
134a1d56debSopenharmony_ci                                    "key_value1"
135a1d56debSopenharmony_ci                            :                        "value"
136a1d56debSopenharmony_ci                ,         "key_value2"     :           [
137a1d56debSopenharmony_ci                      ]             ,                     "key_value3"                  :
138a1d56debSopenharmony_ci                      {}
139a1d56debSopenharmony_ci    }
140a1d56debSopenharmony_ci]
141a1d56debSopenharmony_ci"#;
142a1d56debSopenharmony_ci
143a1d56debSopenharmony_cipub const LONG_KEY_VALUE: &str = r#"
144a1d56debSopenharmony_ci{
145a1d56debSopenharmony_ci    "long_key_value_object":{
146a1d56debSopenharmony_ci    "-----LONG KEY-----uoTVt77ryiZ5GnfVXf6kEBJQS8hBMY2BMsyLyckIPrNEvknjp82jz9yatYV0S77uLb99nPR6WqSDPtrWzc1XHJVPLoIlxaDGKm4xB7KaFl95wdnYRvuyCEmrzdoZS1KtXyf31vYLD4r9BnFm6wBuefKvONcLNGi5bsZqq100MWmFXjQUYhd6nZDJWVTAtpF195PiyvoJiJxSkiwpallQCqTbcoZTMf5SJ7KH1umstVVPW6NvgRO5PwwHc2N7QytBvw":
147a1d56debSopenharmony_ci    "-----LONG VALUE-----by4iUNvpmeZ5ypvznYm7DSiY6gEgRy64yFGHB6pSgMGVRvElAnrSXpaSC8Exa9aMbx4hGkStSKMSbsk2t8JVxDqBKQVo7NdJiSwQf2p5YxFIU5aS2y4gazdDHcwuo7pqrp47AuXfxC799qUDD4q6VWD9u49Nuy7DXLjrdgLz17cC3uCaMwSZK3wc6Lu0Mri6Di4M9NEe36WGBN1xcmcHvm8GH7XXGikuuZ432HG76DEek1s99jHTzQZEILiDQAB",
148a1d56debSopenharmony_ci
149a1d56debSopenharmony_ci    "-----LONG KEY-----by4iUNvpmeZ5ypvznYm7DSiY6gEgRy64yFGHB6pSgMGVRvElAnrSXpaSC8Exa9aMbx4hGkStSKMSbsk2t8JVxDqBKQVo7NdJiSwQf2p5YxFIU5aS2y4gazdDHcwuo7pqrp47AuXfxC799qUDD4q6VWD9u49Nuy7DXLjrdgLz17cC3uCaMwSZK3wc6Lu0Mri6Di4M9NEe36WGBN1xcmcHvm8GH7XXGikuuZ432HG76DEek1s99jHTzQZEILiDQAB":
150a1d56debSopenharmony_ci    "-----LONG VALUE-----uoTVt77ryiZ5GnfVXf6kEBJQS8hBMY2BMsyLyckIPrNEvknjp82jz9yatYV0S77uLb99nPR6WqSDPtrWzc1XHJVPLoIlxaDGKm4xB7KaFl95wdnYRvuyCEmrzdoZS1KtXyf31vYLD4r9BnFm6wBuefKvONcLNGi5bsZqq100MWmFXjQUYhd6nZDJWVTAtpF195PiyvoJiJxSkiwpallQCqTbcoZTMf5SJ7KH1umstVVPW6NvgRO5PwwHc2N7QytBvw"
151a1d56debSopenharmony_ci    }
152a1d56debSopenharmony_ci}
153a1d56debSopenharmony_ci"#;
154