pyfracturedjson 2.0.0__tar.gz → 2.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/.github/workflows/publish.yml +27 -1
  2. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/.gitignore +0 -1
  3. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/Cargo.lock +1 -1
  4. pyfracturedjson-2.1.1/Cargo.toml +20 -0
  5. pyfracturedjson-2.1.1/LICENSE +20 -0
  6. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/PKG-INFO +23 -20
  7. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/README.md +20 -19
  8. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/fracturedjson/__init__.py +14 -1
  9. pyfracturedjson-2.1.1/fracturedjson/_rust_wrapper.pyi +21 -0
  10. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/pyproject.toml +3 -5
  11. pyfracturedjson-2.1.1/src/lib.rs +38 -0
  12. pyfracturedjson-2.1.1/tests/JSONs/compact_array_complexity_-1.json +148 -0
  13. pyfracturedjson-2.1.1/tests/JSONs/compact_array_complexity_0.json +148 -0
  14. pyfracturedjson-2.1.1/tests/JSONs/compact_array_complexity_1.json +105 -0
  15. pyfracturedjson-2.1.1/tests/JSONs/default_settings.json +53 -0
  16. {pyfracturedjson-2.0.0/tests → pyfracturedjson-2.1.1/tests/JSONs}/indent_2.json +28 -3
  17. pyfracturedjson-2.1.1/tests/JSONs/indent_3.json +53 -0
  18. pyfracturedjson-2.1.1/tests/JSONs/inline_complexity_-1.json +62 -0
  19. pyfracturedjson-2.1.1/tests/JSONs/inline_complexity_0.json +62 -0
  20. pyfracturedjson-2.1.1/tests/JSONs/inline_complexity_1.json +56 -0
  21. {pyfracturedjson-2.0.0/tests → pyfracturedjson-2.1.1/tests/JSONs}/line_len_100.json +29 -3
  22. pyfracturedjson-2.1.1/tests/JSONs/line_len_40.json +168 -0
  23. pyfracturedjson-2.1.1/tests/JSONs/number_list_alignment_decimal.json +53 -0
  24. pyfracturedjson-2.1.1/tests/JSONs/number_list_alignment_left.json +53 -0
  25. pyfracturedjson-2.1.1/tests/JSONs/number_list_alignment_normalize.json +53 -0
  26. pyfracturedjson-2.0.0/tests/default_settings.json → pyfracturedjson-2.1.1/tests/JSONs/number_list_alignment_right.json +29 -3
  27. pyfracturedjson-2.1.1/tests/JSONs/table_row_complexity_-1.json +53 -0
  28. pyfracturedjson-2.1.1/tests/JSONs/table_row_complexity_0.json +53 -0
  29. pyfracturedjson-2.1.1/tests/JSONs/table_row_complexity_1.json +53 -0
  30. pyfracturedjson-2.1.1/tests/common.py +60 -0
  31. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/tests/test_basic_output.py +1 -10
  32. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/tests/test_builtin_wrapper.py +1 -10
  33. pyfracturedjson-2.0.0/Cargo.toml +0 -13
  34. pyfracturedjson-2.0.0/fracturedjson/_rust_wrapper.pyi +0 -12
  35. pyfracturedjson-2.0.0/src/lib.rs +0 -19
  36. {pyfracturedjson-2.0.0 → pyfracturedjson-2.1.1}/uv.lock +0 -0
@@ -191,6 +191,32 @@ jobs:
191
191
  name: wheels-macos-${{ matrix.platform.target }}
192
192
  path: dist
193
193
 
194
+ android:
195
+ runs-on: ubuntu-latest
196
+ needs: test_install
197
+ strategy:
198
+ matrix:
199
+ platform:
200
+ - aarch64-linux-android
201
+ - x86_64-linux-android
202
+ # - armv7-linux-androideabi
203
+ steps:
204
+ - uses: actions/checkout@v6
205
+ - uses: actions/setup-python@v6
206
+ with:
207
+ python-version: 3.x
208
+ - name: Build wheels
209
+ uses: PyO3/maturin-action@v1
210
+ with:
211
+ target: ${{ matrix.platform }}
212
+ args: --release --out dist -i python3.12
213
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
214
+ - name: Upload wheels
215
+ uses: actions/upload-artifact@v5
216
+ with:
217
+ name: wheels-android-${{ matrix.platform }}
218
+ path: dist
219
+
194
220
  sdist:
195
221
  runs-on: ubuntu-latest
196
222
  needs: test_install
@@ -210,7 +236,7 @@ jobs:
210
236
  release:
211
237
  name: Release
212
238
  runs-on: ubuntu-latest
213
- needs: [linux, musllinux, windows, macos, sdist, test_install]
239
+ needs: [linux, musllinux, windows, macos, android, sdist, test_install]
214
240
  if: startsWith(github.ref, 'refs/tags/v')
215
241
  permissions:
216
242
  id-token: write
@@ -1,5 +1,4 @@
1
1
  /target
2
- test_env/
3
2
 
4
3
  # Byte-compiled / optimized / DLL files
5
4
  __pycache__/
@@ -168,7 +168,7 @@ dependencies = [
168
168
 
169
169
  [[package]]
170
170
  name = "pyfracturedjson"
171
- version = "2.0.0"
171
+ version = "2.1.1"
172
172
  dependencies = [
173
173
  "fracturedjson",
174
174
  "pyo3",
@@ -0,0 +1,20 @@
1
+ [package]
2
+ name = "pyfracturedjson"
3
+ version = "2.1.1"
4
+ edition = "2024"
5
+ license = "MIT"
6
+ readme = "README.md"
7
+
8
+ [package.metadata.maturin]
9
+ compatibility = "abi3"
10
+
11
+ [lib]
12
+ name = "_rust_wrapper"
13
+ crate-type = ["cdylib"]
14
+
15
+ [dependencies]
16
+ fracturedjson = "0.1.1"
17
+
18
+ [dependencies.pyo3]
19
+ version = "0.28.0"
20
+ features = ["extension-module", "abi3-py39"]
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013-2019 Counsyl/Myriad Genetics Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,11 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyfracturedjson
3
- Version: 2.0.0
3
+ Version: 2.1.1
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ License-File: LICENSE
7
8
  Summary: A compact yet readable JSON formatter
8
9
  Keywords: json,formatter,fracturedjson,compact,readable
10
+ License-Expression: MIT
9
11
  Requires-Python: >=3.9
10
12
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
11
13
  Project-URL: Repository, https://github.com/g-b-f/pyFracturedJSON
@@ -15,24 +17,8 @@ Project-URL: Repository, https://github.com/g-b-f/pyFracturedJSON
15
17
  Adds [FracturedJSON](https://github.com/j-brooke/FracturedJson) support to python,
16
18
  allowing you to create JSON that is both compact and readable.
17
19
 
18
- Using it is easy:
19
20
 
20
- ```python
21
- import json
22
- from fracturedjson import Encoder
23
-
24
- long_list = [f"thing_{i}" for i in range(20)]
25
- data = {"abcd": "abcd", "long_list": long_list}
26
-
27
- print(json.dumps(data, cls=Encoder))
28
- print(json.dumps(data, cls=Encoder, line_length=50))
29
- print(json.dumps(data, cls=Encoder, indent=2))
30
-
31
- with open("file.json", "w") as f:
32
- json.dump(data, f, cls=Encoder)
33
- ```
34
-
35
- You can also use it as a drop-in replacement for the `json` module:
21
+ You can trivially use it as a drop-in replacement for the built-in `json` module:
36
22
 
37
23
  ```python
38
24
  import fracturedjson as json
@@ -53,5 +39,22 @@ with open("file.json") as f:
53
39
  json.loads('{"foo":"bar"}')
54
40
  ```
55
41
 
56
- This is mostly a wrapper around [fracturedjson-rs](https://github.com/fcoury/fracturedjson-rs),
57
- so all credit goes to the creator.
42
+ Or, if you'd prefer:
43
+
44
+ ```python
45
+ import json
46
+ from fracturedjson import Encoder
47
+
48
+ long_list = [f"thing_{i}" for i in range(20)]
49
+ data = {"abcd": "abcd", "long_list": long_list}
50
+
51
+ print(json.dumps(data, cls=Encoder))
52
+ print(json.dumps(data, cls=Encoder, line_length=50))
53
+ print(json.dumps(data, cls=Encoder, indent=2))
54
+
55
+ with open("file.json", "w") as f:
56
+ json.dump(data, f, cls=Encoder)
57
+ ```
58
+
59
+ This is largely a wrapper around [fracturedjson-rs](https://github.com/fcoury/fracturedjson-rs),
60
+ so credit to the creator.
@@ -3,24 +3,8 @@
3
3
  Adds [FracturedJSON](https://github.com/j-brooke/FracturedJson) support to python,
4
4
  allowing you to create JSON that is both compact and readable.
5
5
 
6
- Using it is easy:
7
6
 
8
- ```python
9
- import json
10
- from fracturedjson import Encoder
11
-
12
- long_list = [f"thing_{i}" for i in range(20)]
13
- data = {"abcd": "abcd", "long_list": long_list}
14
-
15
- print(json.dumps(data, cls=Encoder))
16
- print(json.dumps(data, cls=Encoder, line_length=50))
17
- print(json.dumps(data, cls=Encoder, indent=2))
18
-
19
- with open("file.json", "w") as f:
20
- json.dump(data, f, cls=Encoder)
21
- ```
22
-
23
- You can also use it as a drop-in replacement for the `json` module:
7
+ You can trivially use it as a drop-in replacement for the built-in `json` module:
24
8
 
25
9
  ```python
26
10
  import fracturedjson as json
@@ -41,5 +25,22 @@ with open("file.json") as f:
41
25
  json.loads('{"foo":"bar"}')
42
26
  ```
43
27
 
44
- This is mostly a wrapper around [fracturedjson-rs](https://github.com/fcoury/fracturedjson-rs),
45
- so all credit goes to the creator.
28
+ Or, if you'd prefer:
29
+
30
+ ```python
31
+ import json
32
+ from fracturedjson import Encoder
33
+
34
+ long_list = [f"thing_{i}" for i in range(20)]
35
+ data = {"abcd": "abcd", "long_list": long_list}
36
+
37
+ print(json.dumps(data, cls=Encoder))
38
+ print(json.dumps(data, cls=Encoder, line_length=50))
39
+ print(json.dumps(data, cls=Encoder, indent=2))
40
+
41
+ with open("file.json", "w") as f:
42
+ json.dump(data, f, cls=Encoder)
43
+ ```
44
+
45
+ This is largely a wrapper around [fracturedjson-rs](https://github.com/fcoury/fracturedjson-rs),
46
+ so credit to the creator.
@@ -17,6 +17,10 @@ class Encoder(json.encoder.JSONEncoder):
17
17
  indent = 4,
18
18
  separators: tuple[str, str] | None = None,
19
19
  default: Callable | None = None,
20
+ max_inline_complexity = 2,
21
+ max_compact_array_complexity = 2,
22
+ max_table_row_complexity = 2,
23
+ number_list_alignment= "decimal",
20
24
  **kwargs
21
25
  ):
22
26
  super().__init__(
@@ -34,6 +38,11 @@ class Encoder(json.encoder.JSONEncoder):
34
38
  indent = 4
35
39
  self._indent = indent
36
40
  self.line_length = kwargs.get("line_length", 120)
41
+ self.max_inline_complexity = max_inline_complexity
42
+ self.max_compact_array_complexity = max_compact_array_complexity
43
+ self.max_table_row_complexity = max_table_row_complexity
44
+ self.number_list_alignment = number_list_alignment
45
+
37
46
 
38
47
 
39
48
  def encode(self, o) -> str:
@@ -41,7 +50,11 @@ class Encoder(json.encoder.JSONEncoder):
41
50
  formatted = _rust_wrapper.reformat_string(
42
51
  unformatted,
43
52
  indent=self._indent,
44
- line_length=self.line_length
53
+ line_length=self.line_length,
54
+ max_inline_complexity = self.max_inline_complexity,
55
+ max_compact_array_complexity = self.max_compact_array_complexity,
56
+ max_table_row_complexity = self.max_table_row_complexity,
57
+ number_list_alignment = self.number_list_alignment
45
58
  )
46
59
  return formatted
47
60
 
@@ -0,0 +1,21 @@
1
+ """Internal. Wraps a rust file, that reformats a json string to FracturedJSON"""
2
+
3
+ def reformat_string(
4
+ input_string: str,
5
+ *,
6
+ indent:int,
7
+ line_length:int,
8
+ max_inline_complexity:int,
9
+ max_compact_array_complexity:int,
10
+ max_table_row_complexity:int,
11
+ number_list_alignment:str
12
+ ) -> str:
13
+ """Reformat a JSON string.
14
+
15
+ Args:
16
+ input: A JSON string to reformat.
17
+
18
+ Returns:
19
+ The reformatted JSON string.
20
+ """
21
+ ...
@@ -4,6 +4,8 @@ requires-python = ">=3.9"
4
4
  description = "A compact yet readable JSON formatter"
5
5
  readme = "README.md"
6
6
  packages = ["fracturedjson"]
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
7
9
 
8
10
  classifiers = [
9
11
  "Programming Language :: Rust",
@@ -28,10 +30,8 @@ follow_untyped_imports = true
28
30
  filterwarnings = ["error"]
29
31
 
30
32
  [tool.maturin]
31
-
32
33
  include = ["fracturedjson/*"]
33
34
 
34
-
35
35
  [tool.ruff.lint]
36
36
  extend-select = [
37
37
  "BLE", # Blind exceptions
@@ -48,6 +48,4 @@ extend-select = [
48
48
  ]
49
49
 
50
50
  [dependency-groups]
51
- dev = [
52
- "pytest>=8.3.5",
53
- ]
51
+ dev = ["pytest>=8.3.5"]
@@ -0,0 +1,38 @@
1
+ use pyo3::prelude::*;
2
+ use fracturedjson::{Formatter, NumberListAlignment};
3
+
4
+ #[pyfunction]
5
+ fn reformat_string(
6
+ input: String,
7
+ indent:usize,
8
+ line_length: usize,
9
+ max_inline_complexity: isize,
10
+ max_compact_array_complexity: isize,
11
+ max_table_row_complexity: isize,
12
+ number_list_alignment: &str
13
+ ) -> String {
14
+ let mut formatter = Formatter::new();
15
+ formatter.options.max_total_line_length = line_length;
16
+ formatter.options.indent_spaces = indent;
17
+ formatter.options.max_inline_complexity = max_inline_complexity;
18
+ formatter.options.max_compact_array_complexity = max_compact_array_complexity;
19
+ formatter.options.max_table_row_complexity = max_table_row_complexity;
20
+
21
+ match number_list_alignment {
22
+ "left" => formatter.options.number_list_alignment = NumberListAlignment::Left,
23
+ "right" => formatter.options.number_list_alignment = NumberListAlignment::Right,
24
+ "decimal" => formatter.options.number_list_alignment = NumberListAlignment::Decimal,
25
+ "normalize" => formatter.options.number_list_alignment = NumberListAlignment::Normalize,
26
+ _ => formatter.options.number_list_alignment = NumberListAlignment::Decimal
27
+ }
28
+
29
+ let formatted = formatter.reformat(&input, 0);
30
+ let output = formatted.expect("Unexpected output");
31
+ return output
32
+ }
33
+
34
+ #[pymodule]
35
+ fn _rust_wrapper(m: &Bound<'_, PyModule>) -> PyResult<()> {
36
+ m.add_function(wrap_pyfunction!(reformat_string, m)?)?;
37
+ Ok(())
38
+ }
@@ -0,0 +1,148 @@
1
+ {
2
+ "BasicObject": {
3
+ "ModuleId" : "armor",
4
+ "Name" : "",
5
+ "Locations" : [
6
+ [11, 2],
7
+ [11, 3],
8
+ [11, 4],
9
+ [11, 5],
10
+ [11, 6],
11
+ [11, 7],
12
+ [11, 8],
13
+ [11, 9],
14
+ [11, 10],
15
+ [11, 11],
16
+ [11, 12],
17
+ [11, 13],
18
+ [11, 14],
19
+ [ 1, 14],
20
+ [ 1, 13],
21
+ [ 1, 12],
22
+ [ 1, 11],
23
+ [ 1, 10],
24
+ [ 1, 9],
25
+ [ 1, 8],
26
+ [ 1, 7],
27
+ [ 1, 6],
28
+ [ 1, 5],
29
+ [ 1, 4],
30
+ [ 1, 3],
31
+ [ 1, 2],
32
+ [ 4, 2],
33
+ [ 5, 2],
34
+ [ 6, 2],
35
+ [ 7, 2],
36
+ [ 8, 2],
37
+ [ 8, 3],
38
+ [ 7, 3],
39
+ [ 6, 3],
40
+ [ 5, 3],
41
+ [ 4, 3],
42
+ [ 0, 4],
43
+ [ 0, 5],
44
+ [ 0, 6],
45
+ [ 0, 7],
46
+ [ 0, 8],
47
+ [12, 8],
48
+ [12, 7],
49
+ [12, 6],
50
+ [12, 5],
51
+ [12, 4]
52
+ ],
53
+ "Orientation": "Fore",
54
+ "Seed" : 272691529
55
+ },
56
+ "SimilarArrays": {
57
+ "Katherine": ["blue", "lightblue", "black" ],
58
+ "Logan" : ["yellow", "blue", "black", "red"],
59
+ "Erik" : ["red", "purple" ],
60
+ "Jean" : ["lightgreen", "yellow", "black" ]
61
+ },
62
+ "SimilarObjects": [
63
+ { "type": "turret", "hp": 400, "loc": {"x": 47, "y": -4}, "flags": "S" },
64
+ { "type": "assassin", "hp": 80, "loc": {"x": 12, "y": 6}, "flags": "Q" },
65
+ { "type": "berserker", "hp": 150, "loc": {"x": 0, "y": 0} },
66
+ { "type": "pittrap", "loc": {"x": 10, "y": -14}, "flags": "S,I" }
67
+ ],
68
+ "NumberAlignmentTests": [
69
+ {"a": 123.456 , "b": 0 , "c": 0 },
70
+ {"a": 234567.8 , "b": 0 , "c": 0 },
71
+ {"a": 3 , "b": 0.0 , "c": 700.0},
72
+ {"a": null , "b": 0.2 , "c": 800.0},
73
+ {"a": 5.6789, "b": 0.35, "c": 0 }
74
+ ],
75
+ "InlineComplexityTests": {
76
+ "Subthing1" : {"X": 55, "Y": 19, "Z": -4},
77
+ "Subthing2" : { "Q": null, "W": [-2, -1, 0, 1] },
78
+ "Distraction": [[], null, null]
79
+ },
80
+ "CompactArrayComplexityTest_1": [
81
+ 2,
82
+ 3,
83
+ 5,
84
+ 7,
85
+ 11,
86
+ 13,
87
+ 17,
88
+ 19,
89
+ 23,
90
+ 29,
91
+ 31,
92
+ 37,
93
+ 41,
94
+ 43,
95
+ 47,
96
+ 53,
97
+ 59,
98
+ 61,
99
+ 67,
100
+ 71,
101
+ 73,
102
+ 79,
103
+ 83,
104
+ 89,
105
+ 97,
106
+ 101,
107
+ 103,
108
+ 107,
109
+ 109,
110
+ 113,
111
+ 127,
112
+ 131,
113
+ 137,
114
+ 139,
115
+ 149,
116
+ 151,
117
+ 157,
118
+ 163,
119
+ 167,
120
+ 173,
121
+ 179,
122
+ 181,
123
+ 191,
124
+ 193,
125
+ 197,
126
+ 199
127
+ ],
128
+ "CompactArrayComplexityTest_2": [
129
+ [19, 2],
130
+ [ 3, 8],
131
+ [14, 0],
132
+ [ 9, 9],
133
+ [ 9, 9],
134
+ [ 0, 3],
135
+ [10, 1],
136
+ [ 9, 1],
137
+ [ 9, 2],
138
+ [ 6, 13],
139
+ [18, 5],
140
+ [ 4, 11],
141
+ [12, 2]
142
+ ],
143
+ "TableRowComplexityTests": {
144
+ "Rect" : { "position": {"x": -44, "y": 3.4 }, "color": [0, 255, 255] },
145
+ "Point": { "position": { "y": 22.0, "z": 3} },
146
+ "Oval" : { "position": null, "color": "#7f3e96" }
147
+ }
148
+ }
@@ -0,0 +1,148 @@
1
+ {
2
+ "BasicObject": {
3
+ "ModuleId" : "armor",
4
+ "Name" : "",
5
+ "Locations" : [
6
+ [11, 2],
7
+ [11, 3],
8
+ [11, 4],
9
+ [11, 5],
10
+ [11, 6],
11
+ [11, 7],
12
+ [11, 8],
13
+ [11, 9],
14
+ [11, 10],
15
+ [11, 11],
16
+ [11, 12],
17
+ [11, 13],
18
+ [11, 14],
19
+ [ 1, 14],
20
+ [ 1, 13],
21
+ [ 1, 12],
22
+ [ 1, 11],
23
+ [ 1, 10],
24
+ [ 1, 9],
25
+ [ 1, 8],
26
+ [ 1, 7],
27
+ [ 1, 6],
28
+ [ 1, 5],
29
+ [ 1, 4],
30
+ [ 1, 3],
31
+ [ 1, 2],
32
+ [ 4, 2],
33
+ [ 5, 2],
34
+ [ 6, 2],
35
+ [ 7, 2],
36
+ [ 8, 2],
37
+ [ 8, 3],
38
+ [ 7, 3],
39
+ [ 6, 3],
40
+ [ 5, 3],
41
+ [ 4, 3],
42
+ [ 0, 4],
43
+ [ 0, 5],
44
+ [ 0, 6],
45
+ [ 0, 7],
46
+ [ 0, 8],
47
+ [12, 8],
48
+ [12, 7],
49
+ [12, 6],
50
+ [12, 5],
51
+ [12, 4]
52
+ ],
53
+ "Orientation": "Fore",
54
+ "Seed" : 272691529
55
+ },
56
+ "SimilarArrays": {
57
+ "Katherine": ["blue", "lightblue", "black" ],
58
+ "Logan" : ["yellow", "blue", "black", "red"],
59
+ "Erik" : ["red", "purple" ],
60
+ "Jean" : ["lightgreen", "yellow", "black" ]
61
+ },
62
+ "SimilarObjects": [
63
+ { "type": "turret", "hp": 400, "loc": {"x": 47, "y": -4}, "flags": "S" },
64
+ { "type": "assassin", "hp": 80, "loc": {"x": 12, "y": 6}, "flags": "Q" },
65
+ { "type": "berserker", "hp": 150, "loc": {"x": 0, "y": 0} },
66
+ { "type": "pittrap", "loc": {"x": 10, "y": -14}, "flags": "S,I" }
67
+ ],
68
+ "NumberAlignmentTests": [
69
+ {"a": 123.456 , "b": 0 , "c": 0 },
70
+ {"a": 234567.8 , "b": 0 , "c": 0 },
71
+ {"a": 3 , "b": 0.0 , "c": 700.0},
72
+ {"a": null , "b": 0.2 , "c": 800.0},
73
+ {"a": 5.6789, "b": 0.35, "c": 0 }
74
+ ],
75
+ "InlineComplexityTests": {
76
+ "Subthing1" : {"X": 55, "Y": 19, "Z": -4},
77
+ "Subthing2" : { "Q": null, "W": [-2, -1, 0, 1] },
78
+ "Distraction": [[], null, null]
79
+ },
80
+ "CompactArrayComplexityTest_1": [
81
+ 2,
82
+ 3,
83
+ 5,
84
+ 7,
85
+ 11,
86
+ 13,
87
+ 17,
88
+ 19,
89
+ 23,
90
+ 29,
91
+ 31,
92
+ 37,
93
+ 41,
94
+ 43,
95
+ 47,
96
+ 53,
97
+ 59,
98
+ 61,
99
+ 67,
100
+ 71,
101
+ 73,
102
+ 79,
103
+ 83,
104
+ 89,
105
+ 97,
106
+ 101,
107
+ 103,
108
+ 107,
109
+ 109,
110
+ 113,
111
+ 127,
112
+ 131,
113
+ 137,
114
+ 139,
115
+ 149,
116
+ 151,
117
+ 157,
118
+ 163,
119
+ 167,
120
+ 173,
121
+ 179,
122
+ 181,
123
+ 191,
124
+ 193,
125
+ 197,
126
+ 199
127
+ ],
128
+ "CompactArrayComplexityTest_2": [
129
+ [19, 2],
130
+ [ 3, 8],
131
+ [14, 0],
132
+ [ 9, 9],
133
+ [ 9, 9],
134
+ [ 0, 3],
135
+ [10, 1],
136
+ [ 9, 1],
137
+ [ 9, 2],
138
+ [ 6, 13],
139
+ [18, 5],
140
+ [ 4, 11],
141
+ [12, 2]
142
+ ],
143
+ "TableRowComplexityTests": {
144
+ "Rect" : { "position": {"x": -44, "y": 3.4 }, "color": [0, 255, 255] },
145
+ "Point": { "position": { "y": 22.0, "z": 3} },
146
+ "Oval" : { "position": null, "color": "#7f3e96" }
147
+ }
148
+ }