Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
289test cases
289files differ
0modified
289new
0deleted
30,564changed lines
+30,564 −0insertions / deletions
Base d3014aaec4f7ed11fb83168f39211b755deeeb1d · PR merge 226393a65a74df49aeea9d819f5260b534da3c08 · Head 875666e875e64f72014bddeff9c954517a8e2040 · raw patch
Test case

test/inputs/json/misc/00c36.json

1 generated file · +39 −0
Acrystaldefault / TopLevel.cr+39 −0
@@ -0,0 +1,39 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelUnion)
4+
5+class PurpleTopLevel
6+ include JSON::Serializable
7+
8+ property country : Country
9+
10+ property date : String
11+
12+ property decimal : String
13+
14+ property indicator : Country
15+
16+ property value : String
17+end
18+
19+class Country
20+ include JSON::Serializable
21+
22+ property id : String
23+
24+ property value : String
25+end
26+
27+class FluffyTopLevel
28+ include JSON::Serializable
29+
30+ property page : Int64
31+
32+ property pages : Int64
33+
34+ property per_page : String
35+
36+ property total : Int64
37+end
38+
39+alias TopLevelUnion = FluffyTopLevel | Array(PurpleTopLevel)
Test case

test/inputs/json/misc/00ec5.json

1 generated file · +121 −0
Acrystaldefault / TopLevel.cr+121 −0
@@ -0,0 +1,121 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "basePath")]
7+ property base_path : String
8+
9+ property definitions : Definitions
10+
11+ property host : String
12+
13+ property info : Info
14+
15+ property paths : Paths
16+
17+ property produces : Array(String)
18+
19+ property schemes : Array(String)
20+
21+ property swagger : String
22+end
23+
24+class Definitions
25+ include JSON::Serializable
26+
27+ @[JSON::Field(key: "Provider")]
28+ property provider : Provider
29+end
30+
31+class Provider
32+ include JSON::Serializable
33+
34+ property properties : Hash(String, Property)
35+end
36+
37+class Property
38+ include JSON::Serializable
39+
40+ property description : String
41+
42+ @[JSON::Field(key: "type")]
43+ property property_type : String
44+end
45+
46+class Info
47+ include JSON::Serializable
48+
49+ property description : String
50+
51+ property title : String
52+
53+ property version : String
54+end
55+
56+class Paths
57+ include JSON::Serializable
58+
59+ @[JSON::Field(key: "/business_service_providers/search")]
60+ property business_service_providers_search : BusinessServiceProvidersSearch
61+end
62+
63+class BusinessServiceProvidersSearch
64+ include JSON::Serializable
65+
66+ property get : Get
67+end
68+
69+class Get
70+ include JSON::Serializable
71+
72+ property description : String
73+
74+ property parameters : Array(Parameter)
75+
76+ property responses : Responses
77+
78+ property summary : String
79+
80+ property tags : Array(String)
81+end
82+
83+class Parameter
84+ include JSON::Serializable
85+
86+ property description : String
87+
88+ property format : String
89+
90+ property name : String
91+
92+ @[JSON::Field(key: "in")]
93+ property parameter_in : String
94+
95+ @[JSON::Field(key: "type")]
96+ property parameter_type : String
97+
98+ property required : Bool
99+end
100+
101+class Responses
102+ include JSON::Serializable
103+
104+ @[JSON::Field(key: "200")]
105+ property the_200 : The200
106+end
107+
108+class The200
109+ include JSON::Serializable
110+
111+ property description : String
112+
113+ property schema : Schema
114+end
115+
116+class Schema
117+ include JSON::Serializable
118+
119+ @[JSON::Field(key: "$ref")]
120+ property ref : String
121+end
Test case

test/inputs/json/misc/010b1.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property age : Int64
9+
10+ property country : String
11+
12+ property females : Int64
13+
14+ property males : Int64
15+
16+ property total : Int64
17+
18+ property year : Int64
19+end
Test case

test/inputs/json/misc/016af.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/033b1.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/050b0.json

1 generated file · +57 −0
Acrystaldefault / TopLevel.cr+57 −0
@@ -0,0 +1,57 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(OtherName)
19+
20+ property superseded_by : String?
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class OtherName
42+ include JSON::Serializable
43+
44+ property name : String
45+
46+ property note : String?
47+end
48+
49+class Text
50+ include JSON::Serializable
51+
52+ property media_type : String
53+
54+ property title : String
55+
56+ property url : String
57+end
Test case

test/inputs/json/misc/06bee.json

1 generated file · +49 −0
Acrystaldefault / TopLevel.cr+49 −0
@@ -0,0 +1,49 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(JSON::Any?)
19+
20+ property superseded_by : Nil
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class Text
42+ include JSON::Serializable
43+
44+ property media_type : String
45+
46+ property title : String
47+
48+ property url : String
49+end
Test case

test/inputs/json/misc/07540.json

1 generated file · +12 −0
Acrystaldefault / TopLevel.cr+12 −0
@@ -0,0 +1,12 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property cookies : Cookies
7+end
8+
9+class Cookies
10+ include JSON::Serializable
11+
12+end
Test case

test/inputs/json/misc/0779f.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/07c75.json

1 generated file · +49 −0
Acrystaldefault / TopLevel.cr+49 −0
@@ -0,0 +1,49 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(JSON::Any?)
19+
20+ property superseded_by : Nil
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class Text
42+ include JSON::Serializable
43+
44+ property media_type : String
45+
46+ property title : String
47+
48+ property url : String
49+end
Test case

test/inputs/json/misc/09f54.json

1 generated file · +29 −0
Acrystaldefault / TopLevel.cr+29 −0
@@ -0,0 +1,29 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Hash(String, Datum)
7+
8+ property description : Description
9+end
10+
11+class Datum
12+ include JSON::Serializable
13+
14+ property anomaly : String
15+
16+ property value : String
17+end
18+
19+class Description
20+ include JSON::Serializable
21+
22+ property base_period : String
23+
24+ property missing : Int64
25+
26+ property title : String
27+
28+ property units : String
29+end
Test case

test/inputs/json/misc/0a358.json

1 generated file · +41 −0
Acrystaldefault / TopLevel.cr+41 −0
@@ -0,0 +1,41 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property count : Int64
7+
8+ property facets : Facets
9+
10+ property limit : Int64
11+
12+ property offset : Int64
13+
14+ property previous : Bool
15+
16+ property results : Array(Result)
17+
18+ @[JSON::Field(key: "next")]
19+ property top_level_next : String
20+end
21+
22+class Facets
23+ include JSON::Serializable
24+
25+end
26+
27+class Result
28+ include JSON::Serializable
29+
30+ property code : String
31+
32+ property created_at : String
33+
34+ property id : Int64
35+
36+ property name : String
37+
38+ property updated_at : String
39+
40+ property uri : String
41+end
Test case

test/inputs/json/misc/0a91a.json

1 generated file · +414 −0
Acrystaldefault / TopLevel.cr+414 −0
@@ -0,0 +1,414 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property actor : Actor
9+
10+ property created_at : String
11+
12+ property id : String
13+
14+ property org : Actor?
15+
16+ property payload : Payload
17+
18+ property public : Bool
19+
20+ property repo : TopLevelRepo
21+
22+ @[JSON::Field(key: "type")]
23+ property top_level_type : String
24+end
25+
26+class Actor
27+ include JSON::Serializable
28+
29+ property avatar_url : String
30+
31+ property display_login : String?
32+
33+ property gravatar_id : String
34+
35+ property id : Int64
36+
37+ property login : String
38+
39+ property url : String
40+end
41+
42+class Payload
43+ include JSON::Serializable
44+
45+ property action : String?
46+
47+ property before : String?
48+
49+ property commits : Array(Commit)?
50+
51+ property description : String?
52+
53+ property distinct_size : Int64?
54+
55+ property head : String?
56+
57+ property master_branch : String?
58+
59+ property number : Int64?
60+
61+ property pull_request : PullRequest?
62+
63+ property push_id : Int64?
64+
65+ property pusher_type : String?
66+
67+ property ref : String?
68+
69+ property ref_type : String?
70+
71+ property size : Int64?
72+end
73+
74+class Commit
75+ include JSON::Serializable
76+
77+ property author : Author
78+
79+ property distinct : Bool
80+
81+ property message : String
82+
83+ property sha : String
84+
85+ property url : String
86+end
87+
88+class Author
89+ include JSON::Serializable
90+
91+ property email : String
92+
93+ property name : String
94+end
95+
96+class PullRequest
97+ include JSON::Serializable
98+
99+ property additions : Int64
100+
101+ property assignee : Nil
102+
103+ property assignees : Array(JSON::Any?)
104+
105+ property base : Base
106+
107+ property body : String
108+
109+ property changed_files : Int64
110+
111+ property closed_at : String
112+
113+ property comments : Int64
114+
115+ property comments_url : String
116+
117+ property commits : Int64
118+
119+ property commits_url : String
120+
121+ property created_at : String
122+
123+ property deletions : Int64
124+
125+ property diff_url : String
126+
127+ property head : Base
128+
129+ property html_url : String
130+
131+ property id : Int64
132+
133+ property issue_url : String
134+
135+ @[JSON::Field(key: "_links")]
136+ property links : Links
137+
138+ property locked : Bool
139+
140+ property maintainer_can_modify : Bool
141+
142+ property merge_commit_sha : String
143+
144+ property mergeable : Nil
145+
146+ property mergeable_state : String
147+
148+ property merged : Bool
149+
150+ property merged_at : String
151+
152+ property merged_by : MergedBy
153+
154+ property milestone : Nil
155+
156+ property number : Int64
157+
158+ property patch_url : String
159+
160+ property rebaseable : Nil
161+
162+ property requested_reviewers : Array(JSON::Any?)
163+
164+ property review_comment_url : String
165+
166+ property review_comments : Int64
167+
168+ property review_comments_url : String
169+
170+ property state : String
171+
172+ property statuses_url : String
173+
174+ property title : String
175+
176+ property updated_at : String
177+
178+ property url : String
179+
180+ property user : MergedBy
181+end
182+
183+class Base
184+ include JSON::Serializable
185+
186+ property label : String
187+
188+ property ref : String
189+
190+ property repo : BaseRepo
191+
192+ property sha : String
193+
194+ property user : MergedBy
195+end
196+
197+class BaseRepo
198+ include JSON::Serializable
199+
200+ property archive_url : String
201+
202+ property assignees_url : String
203+
204+ property blobs_url : String
205+
206+ property branches_url : String
207+
208+ property clone_url : String
209+
210+ property collaborators_url : String
211+
212+ property comments_url : String
213+
214+ property commits_url : String
215+
216+ property compare_url : String
217+
218+ property contents_url : String
219+
220+ property contributors_url : String
221+
222+ property created_at : String
223+
224+ property default_branch : String
225+
226+ property deployments_url : String
227+
228+ property description : Nil
229+
230+ property downloads_url : String
231+
232+ property events_url : String
233+
234+ property fork : Bool
235+
236+ property forks : Int64
237+
238+ property forks_count : Int64
239+
240+ property forks_url : String
241+
242+ property full_name : String
243+
244+ property git_commits_url : String
245+
246+ property git_refs_url : String
247+
248+ property git_tags_url : String
249+
250+ property git_url : String
251+
252+ property has_downloads : Bool
253+
254+ property has_issues : Bool
255+
256+ property has_pages : Bool
257+
258+ property has_projects : Bool
259+
260+ property has_wiki : Bool
261+
262+ property homepage : Nil
263+
264+ property hooks_url : String
265+
266+ property html_url : String
267+
268+ property id : Int64
269+
270+ property issue_comment_url : String
271+
272+ property issue_events_url : String
273+
274+ property issues_url : String
275+
276+ property keys_url : String
277+
278+ property labels_url : String
279+
280+ property language : String
281+
282+ property languages_url : String
283+
284+ property merges_url : String
285+
286+ property milestones_url : String
287+
288+ property mirror_url : Nil
289+
290+ property name : String
291+
292+ property notifications_url : String
293+
294+ property open_issues : Int64
295+
296+ property open_issues_count : Int64
297+
298+ property owner : MergedBy
299+
300+ property pulls_url : String
301+
302+ property pushed_at : String
303+
304+ property releases_url : String
305+
306+ @[JSON::Field(key: "private")]
307+ property repo_private : Bool
308+
309+ property size : Int64
310+
311+ property ssh_url : String
312+
313+ property stargazers_count : Int64
314+
315+ property stargazers_url : String
316+
317+ property statuses_url : String
318+
319+ property subscribers_url : String
320+
321+ property subscription_url : String
322+
323+ property svn_url : String
324+
325+ property tags_url : String
326+
327+ property teams_url : String
328+
329+ property trees_url : String
330+
331+ property updated_at : String
332+
333+ property url : String
334+
335+ property watchers : Int64
336+
337+ property watchers_count : Int64
338+end
339+
340+class MergedBy
341+ include JSON::Serializable
342+
343+ property avatar_url : String
344+
345+ property events_url : String
346+
347+ property followers_url : String
348+
349+ property following_url : String
350+
351+ property gists_url : String
352+
353+ property gravatar_id : String
354+
355+ property html_url : String
356+
357+ property id : Int64
358+
359+ property login : String
360+
361+ @[JSON::Field(key: "type")]
362+ property merged_by_type : String
363+
364+ property organizations_url : String
365+
366+ property received_events_url : String
367+
368+ property repos_url : String
369+
370+ property site_admin : Bool
371+
372+ property starred_url : String
373+
374+ property subscriptions_url : String
375+
376+ property url : String
377+end
378+
379+class Links
380+ include JSON::Serializable
381+
382+ property comments : Comments
383+
384+ property commits : Comments
385+
386+ property html : Comments
387+
388+ property issue : Comments
389+
390+ @[JSON::Field(key: "self")]
391+ property links_self : Comments
392+
393+ property review_comment : Comments
394+
395+ property review_comments : Comments
396+
397+ property statuses : Comments
398+end
399+
400+class Comments
401+ include JSON::Serializable
402+
403+ property href : String
404+end
405+
406+class TopLevelRepo
407+ include JSON::Serializable
408+
409+ property id : Int64
410+
411+ property name : String
412+
413+ property url : String
414+end
Test case

test/inputs/json/misc/0b91a.json

1 generated file · +80 −0
Acrystaldefault / TopLevel.cr+80 −0
@@ -0,0 +1,80 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property metadata : Metadata
7+
8+ property results : Array(Result)
9+end
10+
11+class Metadata
12+ include JSON::Serializable
13+
14+ @[JSON::Field(key: "executionTime")]
15+ property execution_time : Float64
16+
17+ @[JSON::Field(key: "responseInfo")]
18+ property response_info : ResponseInfo
19+
20+ property resultset : Resultset
21+end
22+
23+class ResponseInfo
24+ include JSON::Serializable
25+
26+ @[JSON::Field(key: "developerMessage")]
27+ property developer_message : String
28+
29+ property status : Int64
30+end
31+
32+class Resultset
33+ include JSON::Serializable
34+
35+ property count : Int64
36+
37+ property page : Int64
38+
39+ property pagesize : Int64
40+end
41+
42+class Result
43+ include JSON::Serializable
44+
45+ property attachment : Array(JSON::Any?)
46+
47+ property body : String
48+
49+ property changed : String
50+
51+ property component : Array(Component)
52+
53+ property created : String
54+
55+ property date : String
56+
57+ property image : Array(JSON::Any?)
58+
59+ property number : Nil
60+
61+ property teaser : Nil
62+
63+ property title : String
64+
65+ property topic : Array(JSON::Any?)
66+
67+ property url : String
68+
69+ property uuid : String
70+
71+ property vuuid : String
72+end
73+
74+class Component
75+ include JSON::Serializable
76+
77+ property name : String
78+
79+ property uuid : String
80+end
Test case

test/inputs/json/misc/0cffa.json

1 generated file · +195 −0
Acrystaldefault / TopLevel.cr+195 −0
@@ -0,0 +1,195 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Datum)
7+
8+ property meta : Meta
9+
10+ property pagination : Pagination
11+end
12+
13+class Datum
14+ include JSON::Serializable
15+
16+ property bitly_gif_url : String
17+
18+ property bitly_url : String
19+
20+ property content_url : String
21+
22+ @[JSON::Field(key: "type")]
23+ property datum_type : String
24+
25+ property embed_url : String
26+
27+ property id : String
28+
29+ property images : Images
30+
31+ property import_datetime : String
32+
33+ property is_indexable : Int64
34+
35+ property rating : String
36+
37+ property slug : String
38+
39+ property source : String
40+
41+ property source_post_url : String
42+
43+ property source_tld : String
44+
45+ property trending_datetime : String
46+
47+ property url : String
48+
49+ property user : User?
50+
51+ property username : String
52+end
53+
54+class Images
55+ include JSON::Serializable
56+
57+ property downsized : Downsized
58+
59+ property downsized_large : Downsized
60+
61+ property downsized_medium : Downsized
62+
63+ property downsized_small : DownsizedSmall
64+
65+ property downsized_still : Downsized
66+
67+ property fixed_height : FixedHeight
68+
69+ property fixed_height_downsampled : FixedHeight
70+
71+ property fixed_height_small : FixedHeight
72+
73+ property fixed_height_small_still : Downsized
74+
75+ property fixed_height_still : Downsized
76+
77+ property fixed_width : FixedHeight
78+
79+ property fixed_width_downsampled : FixedHeight
80+
81+ property fixed_width_small : FixedHeight
82+
83+ property fixed_width_small_still : Downsized
84+
85+ property fixed_width_still : Downsized
86+
87+ property looping : Looping
88+
89+ property original : FixedHeight
90+
91+ property original_mp4 : DownsizedSmall
92+
93+ property original_still : Downsized
94+
95+ property preview : DownsizedSmall
96+
97+ property preview_gif : Downsized
98+
99+ property preview_webp : Downsized
100+
101+ @[JSON::Field(key: "480w_still")]
102+ property the_480_w_still : Downsized?
103+end
104+
105+class Downsized
106+ include JSON::Serializable
107+
108+ property height : String
109+
110+ property size : String?
111+
112+ property url : String
113+
114+ property width : String
115+end
116+
117+class DownsizedSmall
118+ include JSON::Serializable
119+
120+ property height : String
121+
122+ property mp4 : String
123+
124+ property mp4_size : String
125+
126+ property width : String
127+end
128+
129+class FixedHeight
130+ include JSON::Serializable
131+
132+ property frames : String?
133+
134+ property hash : String?
135+
136+ property height : String
137+
138+ property mp4 : String?
139+
140+ property mp4_size : String?
141+
142+ property size : String
143+
144+ property url : String
145+
146+ property webp : String
147+
148+ property webp_size : String
149+
150+ property width : String
151+end
152+
153+class Looping
154+ include JSON::Serializable
155+
156+ property mp4 : String
157+
158+ property mp4_size : String
159+end
160+
161+class User
162+ include JSON::Serializable
163+
164+ property avatar_url : String
165+
166+ property banner_url : String
167+
168+ property display_name : String
169+
170+ property profile_url : String
171+
172+ property twitter : String
173+
174+ property username : String
175+end
176+
177+class Meta
178+ include JSON::Serializable
179+
180+ property msg : String
181+
182+ property response_id : String
183+
184+ property status : Int64
185+end
186+
187+class Pagination
188+ include JSON::Serializable
189+
190+ property count : Int64
191+
192+ property offset : Int64
193+
194+ property total_count : Int64
195+end
Test case

test/inputs/json/misc/0e0c2.json

1 generated file · +125 −0
Acrystaldefault / TopLevel.cr+125 −0
@@ -0,0 +1,125 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property count : Int64
7+
8+ property previous : Nil
9+
10+ property results : Array(Result)
11+
12+ @[JSON::Field(key: "next")]
13+ property top_level_next : String
14+end
15+
16+class Result
17+ include JSON::Serializable
18+
19+ property active_screens : Int64
20+
21+ property collections : Array(Collection)
22+
23+ property details : Array(Detail)
24+
25+ property duration : Int64
26+
27+ property fav_movie : FavMovie
28+
29+ property id : Int64
30+
31+ property images : Array(Image)
32+
33+ property language : String
34+
35+ property release_date : String
36+
37+ property stars : Int64
38+
39+ property tags : Array(JSON::Any?)?
40+
41+ property title : String
42+
43+ property videos : Array(Video)
44+
45+ property vote_score : VoteScore
46+
47+ property watches : Int64
48+end
49+
50+class Collection
51+ include JSON::Serializable
52+
53+ property id : Int64
54+
55+ property movies : Array(Int64)
56+
57+ property name : String
58+
59+ property slug : String
60+end
61+
62+class Detail
63+ include JSON::Serializable
64+
65+ property cast : String
66+
67+ property director : String
68+
69+ property id : Int64
70+
71+ property language : String
72+
73+ property storyline : String
74+
75+ property tagline : String
76+
77+ property title : String
78+end
79+
80+class FavMovie
81+ include JSON::Serializable
82+
83+ property follow : Bool
84+
85+ property star : Bool
86+
87+ property watched : Bool
88+end
89+
90+class Image
91+ include JSON::Serializable
92+
93+ property favs : Int64
94+
95+ property id : Int64
96+
97+ @[JSON::Field(key: "type")]
98+ property image_type : String
99+
100+ property thumbnail : String
101+
102+ property url : String
103+end
104+
105+class Video
106+ include JSON::Serializable
107+
108+ property kind : String
109+
110+ property language : String
111+
112+ property source : String
113+
114+ property url : String
115+end
116+
117+class VoteScore
118+ include JSON::Serializable
119+
120+ property avg : Int64
121+
122+ property score : Int64
123+
124+ property total : Int64
125+end
Test case

test/inputs/json/misc/0fecf.json

1 generated file · +7 −0
Acrystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property countries : Array(String)
7+end
Test case

test/inputs/json/misc/10be4.json

1 generated file · +57 −0
Acrystaldefault / TopLevel.cr+57 −0
@@ -0,0 +1,57 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(OtherName)
19+
20+ property superseded_by : String?
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class OtherName
42+ include JSON::Serializable
43+
44+ property name : String
45+
46+ property note : String?
47+end
48+
49+class Text
50+ include JSON::Serializable
51+
52+ property media_type : String
53+
54+ property title : String
55+
56+ property url : String
57+end
Test case

test/inputs/json/misc/112b5.json

1 generated file · +34 −0
Acrystaldefault / TopLevel.cr+34 −0
@@ -0,0 +1,34 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property args : Args
7+
8+ property headers : Headers
9+
10+ property origin : String
11+
12+ property url : String
13+end
14+
15+class Args
16+ include JSON::Serializable
17+
18+end
19+
20+class Headers
21+ include JSON::Serializable
22+
23+ @[JSON::Field(key: "Accept-Encoding")]
24+ property accept_encoding : String
25+
26+ @[JSON::Field(key: "Connection")]
27+ property connection : String
28+
29+ @[JSON::Field(key: "Host")]
30+ property host : String
31+
32+ @[JSON::Field(key: "User-Agent")]
33+ property user_agent : String
34+end
Test case

test/inputs/json/misc/127a1.json

1 generated file · +195 −0
Acrystaldefault / TopLevel.cr+195 −0
@@ -0,0 +1,195 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Datum)
7+
8+ property meta : Meta
9+
10+ property pagination : Pagination
11+end
12+
13+class Datum
14+ include JSON::Serializable
15+
16+ property bitly_gif_url : String
17+
18+ property bitly_url : String
19+
20+ property content_url : String
21+
22+ @[JSON::Field(key: "type")]
23+ property datum_type : String
24+
25+ property embed_url : String
26+
27+ property id : String
28+
29+ property images : Images
30+
31+ property import_datetime : String
32+
33+ property is_indexable : Int64
34+
35+ property rating : String
36+
37+ property slug : String
38+
39+ property source : String
40+
41+ property source_post_url : String
42+
43+ property source_tld : String
44+
45+ property trending_datetime : String
46+
47+ property url : String
48+
49+ property user : User?
50+
51+ property username : String
52+end
53+
54+class Images
55+ include JSON::Serializable
56+
57+ property downsized : Downsized
58+
59+ property downsized_large : Downsized
60+
61+ property downsized_medium : Downsized
62+
63+ property downsized_small : DownsizedSmall
64+
65+ property downsized_still : Downsized
66+
67+ property fixed_height : FixedHeight
68+
69+ property fixed_height_downsampled : FixedHeight
70+
71+ property fixed_height_small : FixedHeight
72+
73+ property fixed_height_small_still : Downsized
74+
75+ property fixed_height_still : Downsized
76+
77+ property fixed_width : FixedHeight
78+
79+ property fixed_width_downsampled : FixedHeight
80+
81+ property fixed_width_small : FixedHeight
82+
83+ property fixed_width_small_still : Downsized
84+
85+ property fixed_width_still : Downsized
86+
87+ property looping : Looping
88+
89+ property original : FixedHeight
90+
91+ property original_mp4 : DownsizedSmall
92+
93+ property original_still : Downsized
94+
95+ property preview : DownsizedSmall
96+
97+ property preview_gif : Downsized
98+
99+ property preview_webp : Downsized
100+
101+ @[JSON::Field(key: "480w_still")]
102+ property the_480_w_still : Downsized?
103+end
104+
105+class Downsized
106+ include JSON::Serializable
107+
108+ property height : String
109+
110+ property size : String?
111+
112+ property url : String
113+
114+ property width : String
115+end
116+
117+class DownsizedSmall
118+ include JSON::Serializable
119+
120+ property height : String
121+
122+ property mp4 : String
123+
124+ property mp4_size : String
125+
126+ property width : String
127+end
128+
129+class FixedHeight
130+ include JSON::Serializable
131+
132+ property frames : String?
133+
134+ property hash : String?
135+
136+ property height : String
137+
138+ property mp4 : String?
139+
140+ property mp4_size : String?
141+
142+ property size : String
143+
144+ property url : String
145+
146+ property webp : String
147+
148+ property webp_size : String
149+
150+ property width : String
151+end
152+
153+class Looping
154+ include JSON::Serializable
155+
156+ property mp4 : String
157+
158+ property mp4_size : String
159+end
160+
161+class User
162+ include JSON::Serializable
163+
164+ property avatar_url : String
165+
166+ property banner_url : String
167+
168+ property display_name : String
169+
170+ property profile_url : String
171+
172+ property twitter : String?
173+
174+ property username : String
175+end
176+
177+class Meta
178+ include JSON::Serializable
179+
180+ property msg : String
181+
182+ property response_id : String
183+
184+ property status : Int64
185+end
186+
187+class Pagination
188+ include JSON::Serializable
189+
190+ property count : Int64
191+
192+ property offset : Int64
193+
194+ property total_count : Int64
195+end
Test case

test/inputs/json/misc/13d8d.json

1 generated file · +51 −0
Acrystaldefault / TopLevel.cr+51 −0
@@ -0,0 +1,51 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property category : String
9+
10+ property context : String
11+
12+ property id : Int64
13+
14+ property location : Location
15+
16+ property location_subtype : String
17+
18+ property location_type : String
19+
20+ property month : String
21+
22+ property outcome_status : OutcomeStatus
23+
24+ property persistent_id : String
25+end
26+
27+class Location
28+ include JSON::Serializable
29+
30+ property latitude : String
31+
32+ property longitude : String
33+
34+ property street : Street
35+end
36+
37+class Street
38+ include JSON::Serializable
39+
40+ property id : Int64
41+
42+ property name : String
43+end
44+
45+class OutcomeStatus
46+ include JSON::Serializable
47+
48+ property category : String
49+
50+ property date : String
51+end
Test case

test/inputs/json/misc/14d38.json

1 generated file · +23 −0
Acrystaldefault / TopLevel.cr+23 −0
@@ -0,0 +1,23 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property headers : Headers
7+end
8+
9+class Headers
10+ include JSON::Serializable
11+
12+ @[JSON::Field(key: "Accept-Encoding")]
13+ property accept_encoding : String
14+
15+ @[JSON::Field(key: "Connection")]
16+ property connection : String
17+
18+ @[JSON::Field(key: "Host")]
19+ property host : String
20+
21+ @[JSON::Field(key: "User-Agent")]
22+ property user_agent : String
23+end
Test case

test/inputs/json/misc/167d6.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/16bc5.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/176f1.json

1 generated file · +53 −0
Acrystaldefault / TopLevel.cr+53 −0
@@ -0,0 +1,53 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property message : Array(JSON::Any?)
7+
8+ @[JSON::Field(key: "responseTime")]
9+ property response_time : Int64
10+
11+ @[JSON::Field(key: "Results")]
12+ property results : Results
13+
14+ property status : String
15+end
16+
17+class Results
18+ include JSON::Serializable
19+
20+ property series : Array(Series)
21+end
22+
23+class Series
24+ include JSON::Serializable
25+
26+ property data : Array(Datum)
27+
28+ @[JSON::Field(key: "seriesID")]
29+ property series_id : String
30+end
31+
32+class Datum
33+ include JSON::Serializable
34+
35+ property footnotes : Array(Footnote)
36+
37+ property period : String
38+
39+ @[JSON::Field(key: "periodName")]
40+ property period_name : String
41+
42+ property value : String
43+
44+ property year : String
45+end
46+
47+class Footnote
48+ include JSON::Serializable
49+
50+ property code : String?
51+
52+ property text : String?
53+end
Test case

test/inputs/json/misc/1a7f5.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property age : Int64
9+
10+ property country : String
11+
12+ property females : Int64
13+
14+ property males : Int64
15+
16+ property total : Int64
17+
18+ property year : Int64
19+end
Test case

test/inputs/json/misc/1b28c.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/1b409.json

1 generated file · +119 −0
Acrystaldefault / TopLevel.cr+119 −0
@@ -0,0 +1,119 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property meta : Meta
7+
8+ property objects : Array(ObjectElement)
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property limit : Int64
15+
16+ property offset : Int64
17+
18+ property total_count : Int64
19+end
20+
21+class ObjectElement
22+ include JSON::Serializable
23+
24+ property caucus : Nil
25+
26+ property congress_numbers : Array(Int64)
27+
28+ property current : Bool
29+
30+ property description : String
31+
32+ property district : Int64
33+
34+ property enddate : String
35+
36+ property extra : Extra
37+
38+ property id : Int64
39+
40+ property leadership_title : String?
41+
42+ property party : String
43+
44+ property person : Person
45+
46+ property phone : String
47+
48+ property role_type : String
49+
50+ property role_type_label : String
51+
52+ property senator_class : Nil
53+
54+ property senator_rank : Nil
55+
56+ property startdate : String
57+
58+ property state : String
59+
60+ property title : String
61+
62+ property title_long : String
63+
64+ property website : String
65+end
66+
67+class Extra
68+ include JSON::Serializable
69+
70+ property address : String
71+
72+ property contact_form : String?
73+
74+ property fax : String?
75+
76+ property office : String
77+
78+ property rss_url : String?
79+end
80+
81+class Person
82+ include JSON::Serializable
83+
84+ property bioguideid : String
85+
86+ property birthday : String
87+
88+ property cspanid : Int64
89+
90+ property firstname : String
91+
92+ property gender : String
93+
94+ property gender_label : String
95+
96+ property id : Int64
97+
98+ property lastname : String
99+
100+ property link : String
101+
102+ property middlename : String
103+
104+ property name : String
105+
106+ property namemod : String
107+
108+ property nickname : String
109+
110+ property osid : String
111+
112+ property pvsid : String?
113+
114+ property sortname : String
115+
116+ property twitterid : String?
117+
118+ property youtubeid : String?
119+end
Test case

test/inputs/json/misc/2465e.json

1 generated file · +138 −0
Acrystaldefault / TopLevel.cr+138 −0
@@ -0,0 +1,138 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "basePath")]
7+ property base_path : String
8+
9+ property definitions : Definitions
10+
11+ property host : String
12+
13+ property info : Info
14+
15+ property paths : Paths
16+
17+ property produces : Array(String)
18+
19+ property schemes : Array(String)
20+
21+ property swagger : String
22+end
23+
24+class Definitions
25+ include JSON::Serializable
26+
27+ @[JSON::Field(key: "Taxonomy")]
28+ property taxonomy : Taxonomy
29+end
30+
31+class Taxonomy
32+ include JSON::Serializable
33+
34+ property properties : Properties
35+end
36+
37+class Properties
38+ include JSON::Serializable
39+
40+ property annotations : Annotations
41+
42+ property datatype_properties : Annotations
43+
44+ property id : Annotations
45+
46+ property label : Annotations
47+
48+ @[JSON::Field(key: "type")]
49+ property properties_type : Annotations
50+
51+ property sub_class_of : Annotations
52+end
53+
54+class Annotations
55+ include JSON::Serializable
56+
57+ @[JSON::Field(key: "type")]
58+ property annotations_type : String
59+
60+ property description : String
61+end
62+
63+class Info
64+ include JSON::Serializable
65+
66+ property description : String
67+
68+ property title : String
69+
70+ property version : String
71+end
72+
73+class Paths
74+ include JSON::Serializable
75+
76+ @[JSON::Field(key: "/ita_taxonomies/search")]
77+ property ita_taxonomies_search : ItaTaxonomiesSearch
78+end
79+
80+class ItaTaxonomiesSearch
81+ include JSON::Serializable
82+
83+ property get : Get
84+end
85+
86+class Get
87+ include JSON::Serializable
88+
89+ property description : String
90+
91+ property parameters : Array(Parameter)
92+
93+ property responses : Responses
94+
95+ property summary : String
96+
97+ property tags : Array(String)
98+end
99+
100+class Parameter
101+ include JSON::Serializable
102+
103+ property description : String
104+
105+ property format : String
106+
107+ property name : String
108+
109+ @[JSON::Field(key: "in")]
110+ property parameter_in : String
111+
112+ @[JSON::Field(key: "type")]
113+ property parameter_type : String
114+
115+ property required : Bool
116+end
117+
118+class Responses
119+ include JSON::Serializable
120+
121+ @[JSON::Field(key: "200")]
122+ property the_200 : The200
123+end
124+
125+class The200
126+ include JSON::Serializable
127+
128+ property description : String
129+
130+ property schema : Schema
131+end
132+
133+class Schema
134+ include JSON::Serializable
135+
136+ @[JSON::Field(key: "$ref")]
137+ property ref : String
138+end
Test case

test/inputs/json/misc/24f52.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/262f0.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/26b49.json

1 generated file · +197 −0
Acrystaldefault / TopLevel.cr+197 −0
@@ -0,0 +1,197 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Datum)
7+
8+ property meta : Meta
9+
10+ property pagination : Pagination
11+end
12+
13+class Datum
14+ include JSON::Serializable
15+
16+ property bitly_gif_url : String
17+
18+ property bitly_url : String
19+
20+ property content_url : String
21+
22+ @[JSON::Field(key: "type")]
23+ property datum_type : String
24+
25+ property embed_url : String
26+
27+ property id : String
28+
29+ property images : Images
30+
31+ property import_datetime : String
32+
33+ property is_indexable : Int64
34+
35+ property rating : String
36+
37+ property slug : String
38+
39+ property source : String
40+
41+ property source_post_url : String
42+
43+ property source_tld : String
44+
45+ property trending_datetime : String
46+
47+ property url : String
48+
49+ property user : User?
50+
51+ property username : String
52+end
53+
54+class Images
55+ include JSON::Serializable
56+
57+ property downsized : Downsized
58+
59+ property downsized_large : Downsized
60+
61+ property downsized_medium : Downsized
62+
63+ property downsized_small : DownsizedSmall
64+
65+ property downsized_still : Downsized
66+
67+ property fixed_height : FixedHeight
68+
69+ property fixed_height_downsampled : FixedHeight
70+
71+ property fixed_height_small : FixedHeight
72+
73+ property fixed_height_small_still : Downsized
74+
75+ property fixed_height_still : Downsized
76+
77+ property fixed_width : FixedHeight
78+
79+ property fixed_width_downsampled : FixedHeight
80+
81+ property fixed_width_small : FixedHeight
82+
83+ property fixed_width_small_still : Downsized
84+
85+ property fixed_width_still : Downsized
86+
87+ property hd : DownsizedSmall?
88+
89+ property looping : Looping
90+
91+ property original : FixedHeight
92+
93+ property original_mp4 : DownsizedSmall
94+
95+ property original_still : Downsized
96+
97+ property preview : DownsizedSmall
98+
99+ property preview_gif : Downsized
100+
101+ property preview_webp : Downsized
102+
103+ @[JSON::Field(key: "480w_still")]
104+ property the_480_w_still : Downsized?
105+end
106+
107+class Downsized
108+ include JSON::Serializable
109+
110+ property height : String
111+
112+ property size : String?
113+
114+ property url : String
115+
116+ property width : String
117+end
118+
119+class DownsizedSmall
120+ include JSON::Serializable
121+
122+ property height : String
123+
124+ property mp4 : String
125+
126+ property mp4_size : String
127+
128+ property width : String
129+end
130+
131+class FixedHeight
132+ include JSON::Serializable
133+
134+ property frames : String?
135+
136+ property hash : String?
137+
138+ property height : String
139+
140+ property mp4 : String?
141+
142+ property mp4_size : String?
143+
144+ property size : String
145+
146+ property url : String
147+
148+ property webp : String
149+
150+ property webp_size : String
151+
152+ property width : String
153+end
154+
155+class Looping
156+ include JSON::Serializable
157+
158+ property mp4 : String
159+
160+ property mp4_size : String
161+end
162+
163+class User
164+ include JSON::Serializable
165+
166+ property avatar_url : String
167+
168+ property banner_url : String
169+
170+ property display_name : String
171+
172+ property profile_url : String
173+
174+ property twitter : String?
175+
176+ property username : String
177+end
178+
179+class Meta
180+ include JSON::Serializable
181+
182+ property msg : String
183+
184+ property response_id : String
185+
186+ property status : Int64
187+end
188+
189+class Pagination
190+ include JSON::Serializable
191+
192+ property count : Int64
193+
194+ property offset : Int64
195+
196+ property total_count : Int64
197+end
Test case

test/inputs/json/misc/26c9c.json

1 generated file · +400 −0
Acrystaldefault / TopLevel.cr+400 −0
@@ -0,0 +1,400 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Array(Datum?))
7+
8+ property meta : Meta
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property view : View
15+end
16+
17+class View
18+ include JSON::Serializable
19+
20+ property attribution : String
21+
22+ @[JSON::Field(key: "attributionLink")]
23+ property attribution_link : String
24+
25+ @[JSON::Field(key: "averageRating")]
26+ property average_rating : Int64
27+
28+ property category : String
29+
30+ property columns : Array(Column)
31+
32+ @[JSON::Field(key: "createdAt")]
33+ property created_at : Int64
34+
35+ property description : String
36+
37+ @[JSON::Field(key: "displayType")]
38+ property display_type : String
39+
40+ @[JSON::Field(key: "downloadCount")]
41+ property download_count : Int64
42+
43+ property flags : Array(String)
44+
45+ property grants : Array(Grant)
46+
47+ @[JSON::Field(key: "hideFromCatalog")]
48+ property hide_from_catalog : Bool
49+
50+ @[JSON::Field(key: "hideFromDataJson")]
51+ property hide_from_data_json : Bool
52+
53+ property id : String
54+
55+ @[JSON::Field(key: "indexUpdatedAt")]
56+ property index_updated_at : Int64
57+
58+ property locale : String
59+
60+ property metadata : Metadata
61+
62+ property name : String
63+
64+ @[JSON::Field(key: "newBackend")]
65+ property new_backend : Bool
66+
67+ @[JSON::Field(key: "numberOfComments")]
68+ property number_of_comments : Int64
69+
70+ property oid : Int64
71+
72+ property owner : Owner
73+
74+ property provenance : String
75+
76+ @[JSON::Field(key: "publicationAppendEnabled")]
77+ property publication_append_enabled : Bool
78+
79+ @[JSON::Field(key: "publicationDate")]
80+ property publication_date : Int64
81+
82+ @[JSON::Field(key: "publicationGroup")]
83+ property publication_group : Int64
84+
85+ @[JSON::Field(key: "publicationStage")]
86+ property publication_stage : String
87+
88+ property query : Query
89+
90+ property rights : Array(String)
91+
92+ @[JSON::Field(key: "rowsUpdatedAt")]
93+ property rows_updated_at : Int64
94+
95+ @[JSON::Field(key: "rowsUpdatedBy")]
96+ property rows_updated_by : String
97+
98+ @[JSON::Field(key: "tableAuthor")]
99+ property table_author : Owner
100+
101+ @[JSON::Field(key: "tableId")]
102+ property table_id : Int64
103+
104+ property tags : Array(String)
105+
106+ @[JSON::Field(key: "totalTimesRated")]
107+ property total_times_rated : Int64
108+
109+ @[JSON::Field(key: "viewCount")]
110+ property view_count : Int64
111+
112+ @[JSON::Field(key: "viewLastModified")]
113+ property view_last_modified : Int64
114+
115+ @[JSON::Field(key: "viewType")]
116+ property view_type : String
117+end
118+
119+class Column
120+ include JSON::Serializable
121+
122+ @[JSON::Field(key: "cachedContents")]
123+ property cached_contents : CachedContents?
124+
125+ @[JSON::Field(key: "dataTypeName")]
126+ property data_type_name : String
127+
128+ @[JSON::Field(key: "fieldName")]
129+ property field_name : String
130+
131+ property flags : Array(String)?
132+
133+ property format : Format
134+
135+ property id : Int64
136+
137+ property name : String
138+
139+ property position : Int64
140+
141+ @[JSON::Field(key: "renderTypeName")]
142+ property render_type_name : String
143+
144+ @[JSON::Field(key: "tableColumnId")]
145+ property table_column_id : Int64?
146+
147+ property width : Int64?
148+end
149+
150+class CachedContents
151+ include JSON::Serializable
152+
153+ property average : String?
154+
155+ property largest : String
156+
157+ property non_null : Int64
158+
159+ property null : Int64
160+
161+ property smallest : String
162+
163+ property sum : String?
164+
165+ property top : Array(Top)
166+end
167+
168+class Top
169+ include JSON::Serializable
170+
171+ property count : Int64
172+
173+ property item : String
174+end
175+
176+class Format
177+ include JSON::Serializable
178+
179+ property align : String?
180+
181+ @[JSON::Field(key: "noCommas")]
182+ property no_commas : String?
183+
184+ @[JSON::Field(key: "precisionStyle")]
185+ property precision_style : String?
186+
187+ property view : String?
188+end
189+
190+class Grant
191+ include JSON::Serializable
192+
193+ property flags : Array(String)
194+
195+ @[JSON::Field(key: "type")]
196+ property grant_type : String
197+
198+ property inherited : Bool
199+end
200+
201+class Metadata
202+ include JSON::Serializable
203+
204+ property attachments : Array(Attachment)
205+
206+ @[JSON::Field(key: "availableDisplayTypes")]
207+ property available_display_types : Array(String)
208+
209+ property custom_fields : CustomFields
210+
211+ @[JSON::Field(key: "jsonQuery")]
212+ property json_query : JsonQuery
213+
214+ @[JSON::Field(key: "rdfSubject")]
215+ property rdf_subject : String
216+
217+ @[JSON::Field(key: "renderTypeConfig")]
218+ property render_type_config : RenderTypeConfig
219+end
220+
221+class Attachment
222+ include JSON::Serializable
223+
224+ @[JSON::Field(key: "assetId")]
225+ property asset_id : String
226+
227+ @[JSON::Field(key: "blobId")]
228+ property blob_id : String
229+
230+ property filename : String
231+
232+ property name : String
233+end
234+
235+class CustomFields
236+ include JSON::Serializable
237+
238+ @[JSON::Field(key: "Additional Resources")]
239+ property additional_resources : AdditionalResources
240+
241+ @[JSON::Field(key: "Common Core")]
242+ property common_core : CommonCore
243+
244+ @[JSON::Field(key: "Dataset Information")]
245+ property dataset_information : DatasetInformation
246+
247+ @[JSON::Field(key: "Dataset Summary")]
248+ property dataset_summary : DatasetSummary
249+
250+ @[JSON::Field(key: "Notes")]
251+ property notes : Notes
252+end
253+
254+class AdditionalResources
255+ include JSON::Serializable
256+
257+ @[JSON::Field(key: "See Also ")]
258+ property additional_resources_see_also : String
259+
260+ @[JSON::Field(key: "See Also")]
261+ property see_also : String
262+end
263+
264+class CommonCore
265+ include JSON::Serializable
266+
267+ @[JSON::Field(key: "Contact Email")]
268+ property contact_email : String
269+
270+ @[JSON::Field(key: "Contact Name")]
271+ property contact_name : String
272+
273+ @[JSON::Field(key: "Publisher")]
274+ property publisher : String
275+end
276+
277+class DatasetInformation
278+ include JSON::Serializable
279+
280+ @[JSON::Field(key: "Agency")]
281+ property agency : String
282+end
283+
284+class DatasetSummary
285+ include JSON::Serializable
286+
287+ @[JSON::Field(key: "Contact Information")]
288+ property contact_information : String
289+
290+ @[JSON::Field(key: "Coverage")]
291+ property coverage : String
292+
293+ @[JSON::Field(key: "Data Frequency")]
294+ property data_frequency : String
295+
296+ @[JSON::Field(key: "Dataset Owner")]
297+ property dataset_owner : String
298+
299+ @[JSON::Field(key: "Granularity")]
300+ property granularity : String
301+
302+ @[JSON::Field(key: "Organization")]
303+ property organization : String
304+
305+ @[JSON::Field(key: "Posting Frequency")]
306+ property posting_frequency : String
307+
308+ @[JSON::Field(key: "Time Period")]
309+ property time_period : String
310+
311+ @[JSON::Field(key: "Units")]
312+ property units : String
313+end
314+
315+class Notes
316+ include JSON::Serializable
317+
318+ @[JSON::Field(key: "Notes")]
319+ property notes : String
320+end
321+
322+class JsonQuery
323+ include JSON::Serializable
324+
325+ property order : Array(Order)
326+end
327+
328+class Order
329+ include JSON::Serializable
330+
331+ property ascending : Bool
332+
333+ @[JSON::Field(key: "columnFieldName")]
334+ property column_field_name : String
335+end
336+
337+class RenderTypeConfig
338+ include JSON::Serializable
339+
340+ property visible : Visible
341+end
342+
343+class Visible
344+ include JSON::Serializable
345+
346+ property table : Bool
347+end
348+
349+class Owner
350+ include JSON::Serializable
351+
352+ @[JSON::Field(key: "displayName")]
353+ property display_name : String
354+
355+ property id : String
356+
357+ @[JSON::Field(key: "profileImageUrlLarge")]
358+ property profile_image_url_large : String
359+
360+ @[JSON::Field(key: "profileImageUrlMedium")]
361+ property profile_image_url_medium : String
362+
363+ @[JSON::Field(key: "profileImageUrlSmall")]
364+ property profile_image_url_small : String
365+
366+ property rights : Array(String)
367+
368+ @[JSON::Field(key: "roleName")]
369+ property role_name : String
370+
371+ @[JSON::Field(key: "screenName")]
372+ property screen_name : String
373+end
374+
375+class Query
376+ include JSON::Serializable
377+
378+ @[JSON::Field(key: "orderBys")]
379+ property order_bys : Array(OrderBy)
380+end
381+
382+class OrderBy
383+ include JSON::Serializable
384+
385+ property ascending : Bool
386+
387+ property expression : Expression
388+end
389+
390+class Expression
391+ include JSON::Serializable
392+
393+ @[JSON::Field(key: "columnId")]
394+ property column_id : Int64
395+
396+ @[JSON::Field(key: "type")]
397+ property expression_type : String
398+end
399+
400+alias Datum = Int64 | String
Test case

test/inputs/json/misc/27332.json

1 generated file · +246 −0
Acrystaldefault / TopLevel.cr+246 −0
@@ -0,0 +1,246 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : TopLevelData
7+
8+ property kind : String
9+end
10+
11+class TopLevelData
12+ include JSON::Serializable
13+
14+ property after : String
15+
16+ property before : Nil
17+
18+ property children : Array(Child)
19+
20+ property modhash : String
21+end
22+
23+class Child
24+ include JSON::Serializable
25+
26+ property data : ChildData
27+
28+ property kind : String
29+end
30+
31+class ChildData
32+ include JSON::Serializable
33+
34+ property approved_at_utc : Nil
35+
36+ property approved_by : Nil
37+
38+ property archived : Bool
39+
40+ property author : String
41+
42+ property author_flair_css_class : String?
43+
44+ property author_flair_text : String?
45+
46+ property banned_at_utc : Nil
47+
48+ property banned_by : Nil
49+
50+ property brand_safe : Bool
51+
52+ property can_gild : Bool
53+
54+ property can_mod_post : Bool
55+
56+ property clicked : Bool
57+
58+ property contest_mode : Bool
59+
60+ property created : Float64
61+
62+ property created_utc : Float64
63+
64+ property distinguished : String?
65+
66+ property domain : String
67+
68+ property downs : Int64
69+
70+ property edited : Bool
71+
72+ property gilded : Int64
73+
74+ property hidden : Bool
75+
76+ property hide_score : Bool
77+
78+ property id : String
79+
80+ property is_self : Bool
81+
82+ property is_video : Bool
83+
84+ property likes : Nil
85+
86+ property link_flair_css_class : String?
87+
88+ property link_flair_text : String?
89+
90+ property locked : Bool
91+
92+ property media : Media?
93+
94+ property media_embed : MediaEmbed
95+
96+ property mod_reports : Array(JSON::Any?)
97+
98+ property name : String
99+
100+ property num_comments : Int64
101+
102+ property num_reports : Nil
103+
104+ property over_18 : Bool
105+
106+ property permalink : String
107+
108+ property post_hint : String?
109+
110+ property preview : Preview?
111+
112+ property quarantine : Bool
113+
114+ property removal_reason : Nil
115+
116+ property report_reasons : Nil
117+
118+ property saved : Bool
119+
120+ property score : Int64
121+
122+ property secure_media : Media?
123+
124+ property secure_media_embed : MediaEmbed
125+
126+ property selftext : String
127+
128+ property selftext_html : String?
129+
130+ property spoiler : Bool
131+
132+ property stickied : Bool
133+
134+ property subreddit : String
135+
136+ property subreddit_id : String
137+
138+ property subreddit_name_prefixed : String
139+
140+ property subreddit_type : String
141+
142+ property suggested_sort : Nil
143+
144+ property thumbnail : String
145+
146+ property thumbnail_height : Int64?
147+
148+ property thumbnail_width : Int64?
149+
150+ property title : String
151+
152+ property ups : Int64
153+
154+ property url : String
155+
156+ property user_reports : Array(JSON::Any?)
157+
158+ property view_count : Nil
159+
160+ property visited : Bool
161+end
162+
163+class Media
164+ include JSON::Serializable
165+
166+ @[JSON::Field(key: "type")]
167+ property media_type : String
168+
169+ property oembed : Oembed
170+end
171+
172+class Oembed
173+ include JSON::Serializable
174+
175+ property description : String
176+
177+ property height : Int64
178+
179+ property html : String
180+
181+ @[JSON::Field(key: "type")]
182+ property oembed_type : String
183+
184+ property provider_name : String
185+
186+ property provider_url : String
187+
188+ property thumbnail_height : Int64
189+
190+ property thumbnail_url : String
191+
192+ property thumbnail_width : Int64
193+
194+ property title : String
195+
196+ property version : String
197+
198+ property width : Int64
199+end
200+
201+class MediaEmbed
202+ include JSON::Serializable
203+
204+ property content : String?
205+
206+ property height : Int64?
207+
208+ property scrolling : Bool?
209+
210+ property width : Int64?
211+end
212+
213+class Preview
214+ include JSON::Serializable
215+
216+ property enabled : Bool
217+
218+ property images : Array(Image)
219+end
220+
221+class Image
222+ include JSON::Serializable
223+
224+ property id : String
225+
226+ property resolutions : Array(Source)
227+
228+ property source : Source
229+
230+ property variants : Variants
231+end
232+
233+class Source
234+ include JSON::Serializable
235+
236+ property height : Int64
237+
238+ property url : String
239+
240+ property width : Int64
241+end
242+
243+class Variants
244+ include JSON::Serializable
245+
246+end
Test case

test/inputs/json/misc/29f47.json

1 generated file · +214 −0
Acrystaldefault / TopLevel.cr+214 −0
@@ -0,0 +1,214 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : TopLevelData
7+
8+ property kind : String
9+end
10+
11+class TopLevelData
12+ include JSON::Serializable
13+
14+ property after : String
15+
16+ property before : Nil
17+
18+ property children : Array(Child)
19+
20+ property modhash : String
21+end
22+
23+class Child
24+ include JSON::Serializable
25+
26+ property data : ChildData
27+
28+ property kind : String
29+end
30+
31+class ChildData
32+ include JSON::Serializable
33+
34+ property approved_at_utc : Nil
35+
36+ property approved_by : Nil
37+
38+ property archived : Bool
39+
40+ property author : String
41+
42+ property author_flair_css_class : Nil
43+
44+ property author_flair_text : Nil
45+
46+ property banned_at_utc : Nil
47+
48+ property banned_by : Nil
49+
50+ property brand_safe : Bool
51+
52+ property can_gild : Bool
53+
54+ property can_mod_post : Bool
55+
56+ property clicked : Bool
57+
58+ property contest_mode : Bool
59+
60+ property created : Float64
61+
62+ property created_utc : Float64
63+
64+ property distinguished : String
65+
66+ property domain : String
67+
68+ property downs : Int64
69+
70+ property edited : Edited
71+
72+ property gilded : Int64
73+
74+ property hidden : Bool
75+
76+ property hide_score : Bool
77+
78+ property id : String
79+
80+ property is_self : Bool
81+
82+ property is_video : Bool
83+
84+ property likes : Nil
85+
86+ property link_flair_css_class : Nil
87+
88+ property link_flair_text : Nil
89+
90+ property locked : Bool
91+
92+ property media : Nil
93+
94+ property media_embed : MediaEmbed
95+
96+ property mod_reports : Array(JSON::Any?)
97+
98+ property name : String
99+
100+ property num_comments : Int64
101+
102+ property num_reports : Nil
103+
104+ property over_18 : Bool
105+
106+ property permalink : String
107+
108+ property post_hint : String?
109+
110+ property preview : Preview?
111+
112+ property quarantine : Bool
113+
114+ property removal_reason : Nil
115+
116+ property report_reasons : Nil
117+
118+ property saved : Bool
119+
120+ property score : Int64
121+
122+ property secure_media : Nil
123+
124+ property secure_media_embed : MediaEmbed
125+
126+ property selftext : String
127+
128+ property selftext_html : String?
129+
130+ property spoiler : Bool
131+
132+ property stickied : Bool
133+
134+ property subreddit : String
135+
136+ property subreddit_id : String
137+
138+ property subreddit_name_prefixed : String
139+
140+ property subreddit_type : String
141+
142+ property suggested_sort : String?
143+
144+ property thumbnail : String
145+
146+ property thumbnail_height : Int64?
147+
148+ property thumbnail_width : Int64?
149+
150+ property title : String
151+
152+ property ups : Int64
153+
154+ property url : String
155+
156+ property user_reports : Array(JSON::Any?)
157+
158+ property view_count : Nil
159+
160+ property visited : Bool
161+end
162+
163+class MediaEmbed
164+ include JSON::Serializable
165+
166+end
167+
168+class Preview
169+ include JSON::Serializable
170+
171+ property enabled : Bool
172+
173+ property images : Array(Image)
174+end
175+
176+class Image
177+ include JSON::Serializable
178+
179+ property id : String
180+
181+ property resolutions : Array(Source)
182+
183+ property source : Source
184+
185+ property variants : Variants
186+end
187+
188+class Source
189+ include JSON::Serializable
190+
191+ property height : Int64
192+
193+ property url : String
194+
195+ property width : Int64
196+end
197+
198+class Variants
199+ include JSON::Serializable
200+
201+ property gif : Gif?
202+
203+ property mp4 : Gif?
204+end
205+
206+class Gif
207+ include JSON::Serializable
208+
209+ property resolutions : Array(Source)
210+
211+ property source : Source
212+end
213+
214+alias Edited = Float64 | Bool
Test case

test/inputs/json/misc/2d4e2.json

1 generated file · +123 −0
Acrystaldefault / TopLevel.cr+123 −0
@@ -0,0 +1,123 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property meta : Meta
7+
8+ property objects : Array(ObjectElement)
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property limit : Int64
15+
16+ property offset : Int64
17+
18+ property total_count : Int64
19+end
20+
21+class ObjectElement
22+ include JSON::Serializable
23+
24+ property caucus : String?
25+
26+ property congress_numbers : Array(Int64)
27+
28+ property current : Bool
29+
30+ property description : String
31+
32+ property district : Nil
33+
34+ property enddate : String
35+
36+ property extra : Extra
37+
38+ property id : Int64
39+
40+ property leadership_title : String?
41+
42+ property party : String
43+
44+ property person : Person
45+
46+ property phone : String
47+
48+ property role_type : String
49+
50+ property role_type_label : String
51+
52+ property senator_class : String
53+
54+ property senator_class_label : String
55+
56+ property senator_rank : String
57+
58+ property senator_rank_label : String
59+
60+ property startdate : String
61+
62+ property state : String
63+
64+ property title : String
65+
66+ property title_long : String
67+
68+ property website : String
69+end
70+
71+class Extra
72+ include JSON::Serializable
73+
74+ property address : String
75+
76+ property contact_form : String
77+
78+ property fax : String?
79+
80+ property office : String
81+
82+ property rss_url : String?
83+end
84+
85+class Person
86+ include JSON::Serializable
87+
88+ property bioguideid : String
89+
90+ property birthday : String
91+
92+ property cspanid : Int64
93+
94+ property firstname : String
95+
96+ property gender : String
97+
98+ property gender_label : String
99+
100+ property id : Int64
101+
102+ property lastname : String
103+
104+ property link : String
105+
106+ property middlename : String
107+
108+ property name : String
109+
110+ property namemod : String
111+
112+ property nickname : String
113+
114+ property osid : String
115+
116+ property pvsid : String
117+
118+ property sortname : String
119+
120+ property twitterid : String?
121+
122+ property youtubeid : String?
123+end
Test case

test/inputs/json/misc/2df80.json

1 generated file · +53 −0
Acrystaldefault / TopLevel.cr+53 −0
@@ -0,0 +1,53 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelUnion)
4+
5+class PurpleTopLevel
6+ include JSON::Serializable
7+
8+ property adminregion : Adminregion
9+
10+ @[JSON::Field(key: "capitalCity")]
11+ property capital_city : String
12+
13+ property id : String
14+
15+ @[JSON::Field(key: "incomeLevel")]
16+ property income_level : Adminregion
17+
18+ @[JSON::Field(key: "iso2Code")]
19+ property iso2_code : String
20+
21+ property latitude : String
22+
23+ @[JSON::Field(key: "lendingType")]
24+ property lending_type : Adminregion
25+
26+ property longitude : String
27+
28+ property name : String
29+
30+ property region : Adminregion
31+end
32+
33+class Adminregion
34+ include JSON::Serializable
35+
36+ property id : String
37+
38+ property value : String
39+end
40+
41+class FluffyTopLevel
42+ include JSON::Serializable
43+
44+ property page : Int64
45+
46+ property pages : Int64
47+
48+ property per_page : String
49+
50+ property total : Int64
51+end
52+
53+alias TopLevelUnion = FluffyTopLevel | Array(PurpleTopLevel)
Test case

test/inputs/json/misc/31189.json

1 generated file · +47 −0
Acrystaldefault / TopLevel.cr+47 −0
@@ -0,0 +1,47 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property details : String
7+
8+ property rates : Array(Rate)
9+
10+ property version : Nil
11+end
12+
13+class Rate
14+ include JSON::Serializable
15+
16+ property code : String
17+
18+ property country_code : String
19+
20+ property name : String
21+
22+ property periods : Array(Period)
23+end
24+
25+class Period
26+ include JSON::Serializable
27+
28+ property effective_from : String
29+
30+ property rates : Rates
31+end
32+
33+class Rates
34+ include JSON::Serializable
35+
36+ property parking : Float64?
37+
38+ property reduced : Float64?
39+
40+ property reduced1 : Float64?
41+
42+ property reduced2 : Float64?
43+
44+ property standard : Float64
45+
46+ property super_reduced : Float64?
47+end
Test case

test/inputs/json/misc/32431.json

1 generated file · +110 −0
Acrystaldefault / TopLevel.cr+110 −0
@@ -0,0 +1,110 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property bbox : Array(Float64)
7+
8+ property features : Array(Feature)
9+
10+ property metadata : Metadata
11+
12+ @[JSON::Field(key: "type")]
13+ property top_level_type : String
14+end
15+
16+class Feature
17+ include JSON::Serializable
18+
19+ @[JSON::Field(key: "type")]
20+ property feature_type : String
21+
22+ property geometry : Geometry
23+
24+ property id : String
25+
26+ property properties : Properties
27+end
28+
29+class Geometry
30+ include JSON::Serializable
31+
32+ property coordinates : Array(Float64)
33+
34+ @[JSON::Field(key: "type")]
35+ property geometry_type : String
36+end
37+
38+class Properties
39+ include JSON::Serializable
40+
41+ property alert : Nil
42+
43+ property cdi : Nil
44+
45+ property code : String
46+
47+ property detail : String
48+
49+ property dmin : Float64?
50+
51+ property felt : Nil
52+
53+ property gap : Int64?
54+
55+ property ids : String
56+
57+ property mag : Float64
58+
59+ @[JSON::Field(key: "magType")]
60+ property mag_type : String
61+
62+ property mmi : Nil
63+
64+ property net : String
65+
66+ property nst : Int64?
67+
68+ property place : String
69+
70+ @[JSON::Field(key: "type")]
71+ property properties_type : String
72+
73+ property rms : Float64
74+
75+ property sig : Int64
76+
77+ property sources : String
78+
79+ property status : String
80+
81+ property time : Float64
82+
83+ property title : String
84+
85+ property tsunami : Int64
86+
87+ property types : String
88+
89+ property tz : Int64
90+
91+ property updated : Float64
92+
93+ property url : String
94+end
95+
96+class Metadata
97+ include JSON::Serializable
98+
99+ property api : String
100+
101+ property count : Int64
102+
103+ property generated : Float64
104+
105+ property status : Int64
106+
107+ property title : String
108+
109+ property url : String
110+end
Test case

test/inputs/json/misc/32d5c.json

1 generated file · +31 −0
Acrystaldefault / TopLevel.cr+31 −0
@@ -0,0 +1,31 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ @[JSON::Field(key: "BirthDate")]
9+ property birth_date : String?
10+
11+ @[JSON::Field(key: "BirthDateIsProtected")]
12+ property birth_date_is_protected : Bool
13+
14+ @[JSON::Field(key: "GenderTypeID")]
15+ property gender_type_id : Int64
16+
17+ @[JSON::Field(key: "Notes")]
18+ property notes : String
19+
20+ @[JSON::Field(key: "ParliamentaryName")]
21+ property parliamentary_name : String
22+
23+ @[JSON::Field(key: "PersonID")]
24+ property person_id : Int64
25+
26+ @[JSON::Field(key: "PhotoURL")]
27+ property photo_url : String
28+
29+ @[JSON::Field(key: "PreferredName")]
30+ property preferred_name : String
31+end
Test case

test/inputs/json/misc/337ed.json

1 generated file · +116 −0
Acrystaldefault / TopLevel.cr+116 −0
@@ -0,0 +1,116 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property count : Int64
7+
8+ property facets : Facets
9+
10+ property limit : Int64
11+
12+ property offset : Int64
13+
14+ property previous : Bool
15+
16+ property results : Array(Result)
17+
18+ @[JSON::Field(key: "next")]
19+ property top_level_next : String
20+end
21+
22+class Facets
23+ include JSON::Serializable
24+
25+end
26+
27+class Result
28+ include JSON::Serializable
29+
30+ property cost_absolute : Int64?
31+
32+ property cost_max : Int64?
33+
34+ property cost_min : Int64?
35+
36+ property created_at : String
37+
38+ @[JSON::Field(key: "customIncomes")]
39+ property custom_incomes : Array(CustomIncome)
40+
41+ property direct_rep_costs_max : Nil
42+
43+ property direct_rep_costs_min : Nil
44+
45+ property end_date : String
46+
47+ property eur_sources_grants : Int64
48+
49+ property eur_sources_grants_src : String?
50+
51+ property eur_sources_procurement : Int64
52+
53+ property eur_sources_procurement_src : String?
54+
55+ property id : String
56+
57+ property new_organisation : Nil
58+
59+ property no_clients : String?
60+
61+ property other_financial_information : String?
62+
63+ property other_sources_contributions : Int64?
64+
65+ property other_sources_donation : Int64?
66+
67+ property other_sources_total : Int64?
68+
69+ property public_financing_infranational : Int64?
70+
71+ property public_financing_national : Int64?
72+
73+ property public_financing_total : Int64?
74+
75+ property representative : String
76+
77+ @[JSON::Field(key: "type")]
78+ property result_type : String
79+
80+ property start_date : String
81+
82+ property status : String
83+
84+ property total_budget : Int64?
85+
86+ property turnover_absolute : Int64?
87+
88+ property turnover_max : Int64?
89+
90+ property turnover_min : Int64?
91+
92+ property updated_at : String
93+
94+ property uri : String
95+end
96+
97+class CustomIncome
98+ include JSON::Serializable
99+
100+ property amount : Int64
101+
102+ property created_at : String
103+
104+ @[JSON::Field(key: "type")]
105+ property custom_income_type : String
106+
107+ property id : String
108+
109+ property name : String
110+
111+ property status : String
112+
113+ property updated_at : String
114+
115+ property uri : String
116+end
Test case

test/inputs/json/misc/33d2e.json

1 generated file · +72 −0
Acrystaldefault / TopLevel.cr+72 −0
@@ -0,0 +1,72 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property laureates : Array(Laureate)
7+end
8+
9+class Laureate
10+ include JSON::Serializable
11+
12+ property born : String
13+
14+ @[JSON::Field(key: "bornCity")]
15+ property born_city : String?
16+
17+ @[JSON::Field(key: "bornCountry")]
18+ property born_country : String?
19+
20+ @[JSON::Field(key: "bornCountryCode")]
21+ property born_country_code : String?
22+
23+ property died : String
24+
25+ @[JSON::Field(key: "diedCity")]
26+ property died_city : String?
27+
28+ @[JSON::Field(key: "diedCountry")]
29+ property died_country : String?
30+
31+ @[JSON::Field(key: "diedCountryCode")]
32+ property died_country_code : String?
33+
34+ property firstname : String?
35+
36+ property gender : String
37+
38+ property id : String
39+
40+ property prizes : Array(Prize)
41+
42+ property surname : String?
43+end
44+
45+class Prize
46+ include JSON::Serializable
47+
48+ property affiliations : Array(AffiliationElement)
49+
50+ property category : String?
51+
52+ property motivation : String?
53+
54+ @[JSON::Field(key: "overallMotivation")]
55+ property overall_motivation : String?
56+
57+ property share : String?
58+
59+ property year : String?
60+end
61+
62+class AffiliationClass
63+ include JSON::Serializable
64+
65+ property city : String?
66+
67+ property country : String?
68+
69+ property name : String?
70+end
71+
72+alias AffiliationElement = AffiliationClass | Array(JSON::Any?)
Test case

test/inputs/json/misc/34702.json

1 generated file · +89 −0
Acrystaldefault / TopLevel.cr+89 −0
@@ -0,0 +1,89 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property crs : Crs
7+
8+ property features : Array(Feature)
9+
10+ @[JSON::Field(key: "type")]
11+ property top_level_type : String
12+
13+ @[JSON::Field(key: "totalFeatures")]
14+ property total_features : Int64
15+end
16+
17+class Crs
18+ include JSON::Serializable
19+
20+ @[JSON::Field(key: "type")]
21+ property crs_type : String
22+
23+ property properties : CrsProperties
24+end
25+
26+class CrsProperties
27+ include JSON::Serializable
28+
29+ property name : String
30+end
31+
32+class Feature
33+ include JSON::Serializable
34+
35+ @[JSON::Field(key: "type")]
36+ property feature_type : String
37+
38+ property geometry : Geometry
39+
40+ property geometry_name : String
41+
42+ property id : String
43+
44+ property properties : FeatureProperties
45+end
46+
47+class Geometry
48+ include JSON::Serializable
49+
50+ property coordinates : Array(Float64)
51+
52+ @[JSON::Field(key: "type")]
53+ property geometry_type : String
54+end
55+
56+class FeatureProperties
57+ include JSON::Serializable
58+
59+ property division : String
60+
61+ property fax : Float64
62+
63+ property fire_ban_r : String?
64+
65+ property latitude : Float64
66+
67+ property local_govt : String
68+
69+ property longitude : Float64
70+
71+ property no : String?
72+
73+ property phone : Float64
74+
75+ property postcode : Int64
76+
77+ @[JSON::Field(key: "type")]
78+ property properties_type : String?
79+
80+ property psa : String
81+
82+ property region : String
83+
84+ property station : String
85+
86+ property street : String
87+
88+ property suburb : String
89+end
Test case

test/inputs/json/misc/3536b.json

1 generated file · +49 −0
Acrystaldefault / TopLevel.cr+49 −0
@@ -0,0 +1,49 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(JSON::Any?)
19+
20+ property superseded_by : String
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class Text
42+ include JSON::Serializable
43+
44+ property media_type : String
45+
46+ property title : String
47+
48+ property url : String
49+end
Test case

test/inputs/json/misc/3659d.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/36d5d.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/3a6b3.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/3e9a3.json

1 generated file · +53 −0
Acrystaldefault / TopLevel.cr+53 −0
@@ -0,0 +1,53 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property message : Array(JSON::Any?)
7+
8+ @[JSON::Field(key: "responseTime")]
9+ property response_time : Int64
10+
11+ @[JSON::Field(key: "Results")]
12+ property results : Results
13+
14+ property status : String
15+end
16+
17+class Results
18+ include JSON::Serializable
19+
20+ property series : Array(Series)
21+end
22+
23+class Series
24+ include JSON::Serializable
25+
26+ property data : Array(Datum)
27+
28+ @[JSON::Field(key: "seriesID")]
29+ property series_id : String
30+end
31+
32+class Datum
33+ include JSON::Serializable
34+
35+ property footnotes : Array(Footnote)
36+
37+ property period : String
38+
39+ @[JSON::Field(key: "periodName")]
40+ property period_name : String
41+
42+ property value : String
43+
44+ property year : String
45+end
46+
47+class Footnote
48+ include JSON::Serializable
49+
50+ property code : String?
51+
52+ property text : String?
53+end
Test case

test/inputs/json/misc/3f1ce.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/421d4.json

1 generated file · +246 −0
Acrystaldefault / TopLevel.cr+246 −0
@@ -0,0 +1,246 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Array(Datum?))
7+
8+ property meta : Meta
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property view : View
15+end
16+
17+class View
18+ include JSON::Serializable
19+
20+ property attribution : String
21+
22+ @[JSON::Field(key: "averageRating")]
23+ property average_rating : Int64
24+
25+ property category : String
26+
27+ property columns : Array(Column)
28+
29+ @[JSON::Field(key: "createdAt")]
30+ property created_at : Int64
31+
32+ property description : String
33+
34+ @[JSON::Field(key: "displayType")]
35+ property display_type : String
36+
37+ @[JSON::Field(key: "downloadCount")]
38+ property download_count : Int64
39+
40+ property flags : Array(String)
41+
42+ property grants : Array(Grant)
43+
44+ @[JSON::Field(key: "hideFromCatalog")]
45+ property hide_from_catalog : Bool
46+
47+ @[JSON::Field(key: "hideFromDataJson")]
48+ property hide_from_data_json : Bool
49+
50+ property id : String
51+
52+ @[JSON::Field(key: "indexUpdatedAt")]
53+ property index_updated_at : Int64
54+
55+ property license : License
56+
57+ @[JSON::Field(key: "licenseId")]
58+ property license_id : String
59+
60+ property locale : String
61+
62+ property metadata : Metadata
63+
64+ property name : String
65+
66+ @[JSON::Field(key: "newBackend")]
67+ property new_backend : Bool
68+
69+ @[JSON::Field(key: "numberOfComments")]
70+ property number_of_comments : Int64
71+
72+ property oid : Int64
73+
74+ property owner : Owner
75+
76+ property provenance : String
77+
78+ @[JSON::Field(key: "publicationAppendEnabled")]
79+ property publication_append_enabled : Bool
80+
81+ @[JSON::Field(key: "publicationDate")]
82+ property publication_date : Int64
83+
84+ @[JSON::Field(key: "publicationGroup")]
85+ property publication_group : Int64
86+
87+ @[JSON::Field(key: "publicationStage")]
88+ property publication_stage : String
89+
90+ property query : Query
91+
92+ property rights : Array(String)
93+
94+ @[JSON::Field(key: "rowClass")]
95+ property row_class : String
96+
97+ @[JSON::Field(key: "rowsUpdatedAt")]
98+ property rows_updated_at : Int64
99+
100+ @[JSON::Field(key: "rowsUpdatedBy")]
101+ property rows_updated_by : String
102+
103+ @[JSON::Field(key: "tableAuthor")]
104+ property table_author : Owner
105+
106+ @[JSON::Field(key: "tableId")]
107+ property table_id : Int64
108+
109+ property tags : Array(String)
110+
111+ @[JSON::Field(key: "totalTimesRated")]
112+ property total_times_rated : Int64
113+
114+ @[JSON::Field(key: "viewCount")]
115+ property view_count : Int64
116+
117+ @[JSON::Field(key: "viewLastModified")]
118+ property view_last_modified : Int64
119+
120+ @[JSON::Field(key: "viewType")]
121+ property view_type : String
122+end
123+
124+class Column
125+ include JSON::Serializable
126+
127+ @[JSON::Field(key: "cachedContents")]
128+ property cached_contents : CachedContents?
129+
130+ @[JSON::Field(key: "dataTypeName")]
131+ property data_type_name : String
132+
133+ @[JSON::Field(key: "fieldName")]
134+ property field_name : String
135+
136+ property flags : Array(String)?
137+
138+ property format : Query
139+
140+ property id : Int64
141+
142+ property name : String
143+
144+ property position : Int64
145+
146+ @[JSON::Field(key: "renderTypeName")]
147+ property render_type_name : String
148+
149+ @[JSON::Field(key: "tableColumnId")]
150+ property table_column_id : Int64?
151+
152+ property width : Int64?
153+end
154+
155+class CachedContents
156+ include JSON::Serializable
157+
158+ property average : String?
159+
160+ property largest : String?
161+
162+ property non_null : Int64
163+
164+ property null : Int64
165+
166+ property smallest : String?
167+
168+ property sum : String?
169+
170+ property top : Array(Top)?
171+end
172+
173+class Top
174+ include JSON::Serializable
175+
176+ property count : Int64
177+
178+ property item : String
179+end
180+
181+class Query
182+ include JSON::Serializable
183+
184+end
185+
186+class Grant
187+ include JSON::Serializable
188+
189+ property flags : Array(String)
190+
191+ @[JSON::Field(key: "type")]
192+ property grant_type : String
193+
194+ property inherited : Bool
195+end
196+
197+class License
198+ include JSON::Serializable
199+
200+ property name : String
201+end
202+
203+class Metadata
204+ include JSON::Serializable
205+
206+ @[JSON::Field(key: "availableDisplayTypes")]
207+ property available_display_types : Array(String)
208+
209+ @[JSON::Field(key: "rdfClass")]
210+ property rdf_class : String
211+
212+ @[JSON::Field(key: "rdfSubject")]
213+ property rdf_subject : String
214+
215+ @[JSON::Field(key: "renderTypeConfig")]
216+ property render_type_config : RenderTypeConfig
217+
218+ @[JSON::Field(key: "rowIdentifier")]
219+ property row_identifier : String
220+end
221+
222+class RenderTypeConfig
223+ include JSON::Serializable
224+
225+ property visible : Visible
226+end
227+
228+class Visible
229+ include JSON::Serializable
230+
231+ property table : Bool
232+end
233+
234+class Owner
235+ include JSON::Serializable
236+
237+ @[JSON::Field(key: "displayName")]
238+ property display_name : String
239+
240+ property id : String
241+
242+ @[JSON::Field(key: "screenName")]
243+ property screen_name : String
244+end
245+
246+alias Datum = Int64 | String
Test case

test/inputs/json/misc/437e7.json

1 generated file · +190 −0
Acrystaldefault / TopLevel.cr+190 −0
@@ -0,0 +1,190 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Datum)
7+
8+ property meta : Meta
9+
10+ property pagination : Pagination
11+end
12+
13+class Datum
14+ include JSON::Serializable
15+
16+ property bitly_gif_url : String
17+
18+ property bitly_url : String
19+
20+ property content_url : String
21+
22+ @[JSON::Field(key: "type")]
23+ property datum_type : String
24+
25+ property embed_url : String
26+
27+ property id : String
28+
29+ property images : Images
30+
31+ property import_datetime : String
32+
33+ property is_indexable : Int64
34+
35+ property rating : String
36+
37+ property slug : String
38+
39+ property source : String
40+
41+ property source_post_url : String
42+
43+ property source_tld : String
44+
45+ property trending_datetime : String
46+
47+ property url : String
48+
49+ property user : User?
50+
51+ property username : String
52+end
53+
54+class Images
55+ include JSON::Serializable
56+
57+ property downsized : Downsized
58+
59+ property downsized_large : Downsized
60+
61+ property downsized_medium : Downsized
62+
63+ property downsized_small : DownsizedSmall
64+
65+ property downsized_still : Downsized
66+
67+ property fixed_height : FixedHeight
68+
69+ property fixed_height_downsampled : FixedHeight
70+
71+ property fixed_height_small : FixedHeight
72+
73+ property fixed_height_small_still : Downsized
74+
75+ property fixed_height_still : Downsized
76+
77+ property fixed_width : FixedHeight
78+
79+ property fixed_width_downsampled : FixedHeight
80+
81+ property fixed_width_small : FixedHeight
82+
83+ property fixed_width_small_still : Downsized
84+
85+ property fixed_width_still : Downsized
86+
87+ property looping : Looping
88+
89+ property original : FixedHeight
90+
91+ property original_mp4 : DownsizedSmall
92+
93+ property original_still : Downsized
94+
95+ property preview : DownsizedSmall
96+
97+ property preview_gif : Downsized
98+
99+ property preview_webp : Downsized
100+end
101+
102+class Downsized
103+ include JSON::Serializable
104+
105+ property height : String
106+
107+ property size : String?
108+
109+ property url : String
110+
111+ property width : String
112+end
113+
114+class DownsizedSmall
115+ include JSON::Serializable
116+
117+ property height : String
118+
119+ property mp4 : String
120+
121+ property mp4_size : String
122+
123+ property width : String
124+end
125+
126+class FixedHeight
127+ include JSON::Serializable
128+
129+ property frames : String?
130+
131+ property height : String
132+
133+ property mp4 : String?
134+
135+ property mp4_size : String?
136+
137+ property size : String
138+
139+ property url : String
140+
141+ property webp : String
142+
143+ property webp_size : String
144+
145+ property width : String
146+end
147+
148+class Looping
149+ include JSON::Serializable
150+
151+ property mp4 : String
152+
153+ property mp4_size : String
154+end
155+
156+class User
157+ include JSON::Serializable
158+
159+ property avatar_url : String
160+
161+ property banner_url : String
162+
163+ property display_name : String
164+
165+ property profile_url : String
166+
167+ property twitter : String
168+
169+ property username : String
170+end
171+
172+class Meta
173+ include JSON::Serializable
174+
175+ property msg : String
176+
177+ property response_id : String
178+
179+ property status : Int64
180+end
181+
182+class Pagination
183+ include JSON::Serializable
184+
185+ property count : Int64
186+
187+ property offset : Int64
188+
189+ property total_count : Int64
190+end
Test case

test/inputs/json/misc/43970.json

1 generated file · +16 −0
Acrystaldefault / TopLevel.cr+16 −0
@@ -0,0 +1,16 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ @[JSON::Field(key: "ID")]
9+ property id : Int64
10+
11+ @[JSON::Field(key: "Name")]
12+ property name : String
13+
14+ @[JSON::Field(key: "Notes")]
15+ property notes : String
16+end
Test case

test/inputs/json/misc/43eaf.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/458db.json

1 generated file · +78 −0
Acrystaldefault / TopLevel.cr+78 −0
@@ -0,0 +1,78 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property metadata : Metadata
7+
8+ property results : Array(Result)
9+end
10+
11+class Metadata
12+ include JSON::Serializable
13+
14+ @[JSON::Field(key: "executionTime")]
15+ property execution_time : Float64
16+
17+ @[JSON::Field(key: "responseInfo")]
18+ property response_info : ResponseInfo
19+
20+ property resultset : Resultset
21+end
22+
23+class ResponseInfo
24+ include JSON::Serializable
25+
26+ @[JSON::Field(key: "developerMessage")]
27+ property developer_message : String
28+
29+ property status : Int64
30+end
31+
32+class Resultset
33+ include JSON::Serializable
34+
35+ property count : Int64
36+
37+ property page : Int64
38+
39+ property pagesize : Int64
40+end
41+
42+class Result
43+ include JSON::Serializable
44+
45+ property attachments : Array(JSON::Any?)
46+
47+ property body : String
48+
49+ property changed : String
50+
51+ property component : Array(Component)
52+
53+ property created : String
54+
55+ property date : String
56+
57+ property image : Array(JSON::Any?)
58+
59+ property teaser : Array(JSON::Any?)
60+
61+ property title : String
62+
63+ property topic : Array(JSON::Any?)
64+
65+ property url : String
66+
67+ property uuid : String
68+
69+ property vuuid : String
70+end
71+
72+class Component
73+ include JSON::Serializable
74+
75+ property name : String
76+
77+ property uuid : String
78+end
Test case

test/inputs/json/misc/4961a.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Float64
15+end
Test case

test/inputs/json/misc/4a0d7.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/4a455.json

1 generated file · +70 −0
Acrystaldefault / TopLevel.cr+70 −0
@@ -0,0 +1,70 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property crs : Crs
7+
8+ property features : Array(Feature)
9+
10+ @[JSON::Field(key: "type")]
11+ property top_level_type : String
12+
13+ @[JSON::Field(key: "totalFeatures")]
14+ property total_features : Int64
15+end
16+
17+class Crs
18+ include JSON::Serializable
19+
20+ @[JSON::Field(key: "type")]
21+ property crs_type : String
22+
23+ property properties : CrsProperties
24+end
25+
26+class CrsProperties
27+ include JSON::Serializable
28+
29+ property name : String
30+end
31+
32+class Feature
33+ include JSON::Serializable
34+
35+ @[JSON::Field(key: "type")]
36+ property feature_type : String
37+
38+ property geometry : Geometry
39+
40+ property geometry_name : String
41+
42+ property id : String
43+
44+ property properties : FeatureProperties
45+end
46+
47+class Geometry
48+ include JSON::Serializable
49+
50+ property coordinates : Array(Array(Float64))
51+
52+ @[JSON::Field(key: "type")]
53+ property geometry_type : String
54+end
55+
56+class FeatureProperties
57+ include JSON::Serializable
58+
59+ property facebookaccount : String
60+
61+ property frequencyfinderurl : String
62+
63+ property name : String
64+
65+ property siteurl : String
66+
67+ property streetaddress : String
68+
69+ property twitteraccount : String
70+end
Test case

test/inputs/json/misc/4c547.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/4d6fb.json

1 generated file · +248 −0
Acrystaldefault / TopLevel.cr+248 −0
@@ -0,0 +1,248 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : TopLevelData
7+
8+ property kind : String
9+end
10+
11+class TopLevelData
12+ include JSON::Serializable
13+
14+ property after : String
15+
16+ property before : Nil
17+
18+ property children : Array(Child)
19+
20+ property modhash : String
21+end
22+
23+class Child
24+ include JSON::Serializable
25+
26+ property data : ChildData
27+
28+ property kind : String
29+end
30+
31+class ChildData
32+ include JSON::Serializable
33+
34+ property approved_at_utc : Nil
35+
36+ property approved_by : Nil
37+
38+ property archived : Bool
39+
40+ property author : String
41+
42+ property author_flair_css_class : Nil
43+
44+ property author_flair_text : Nil
45+
46+ property banned_at_utc : Nil
47+
48+ property banned_by : Nil
49+
50+ property brand_safe : Bool
51+
52+ property can_gild : Bool
53+
54+ property can_mod_post : Bool
55+
56+ property clicked : Bool
57+
58+ property contest_mode : Bool
59+
60+ property created : Float64
61+
62+ property created_utc : Float64
63+
64+ property distinguished : Nil
65+
66+ property domain : String
67+
68+ property downs : Int64
69+
70+ property edited : Bool
71+
72+ property gilded : Int64
73+
74+ property hidden : Bool
75+
76+ property hide_score : Bool
77+
78+ property id : String
79+
80+ property is_self : Bool
81+
82+ property is_video : Bool
83+
84+ property likes : Nil
85+
86+ property link_flair_css_class : Nil
87+
88+ property link_flair_text : Nil
89+
90+ property locked : Bool
91+
92+ property media : Media?
93+
94+ property media_embed : MediaEmbed
95+
96+ property mod_reports : Array(JSON::Any?)
97+
98+ property name : String
99+
100+ property num_comments : Int64
101+
102+ property num_reports : Nil
103+
104+ property over_18 : Bool
105+
106+ property permalink : String
107+
108+ property post_hint : String?
109+
110+ property preview : Preview?
111+
112+ property quarantine : Bool
113+
114+ property removal_reason : Nil
115+
116+ property report_reasons : Nil
117+
118+ property saved : Bool
119+
120+ property score : Int64
121+
122+ property secure_media : Media?
123+
124+ property secure_media_embed : MediaEmbed
125+
126+ property selftext : String
127+
128+ property selftext_html : Nil
129+
130+ property spoiler : Bool
131+
132+ property stickied : Bool
133+
134+ property subreddit : String
135+
136+ property subreddit_id : String
137+
138+ property subreddit_name_prefixed : String
139+
140+ property subreddit_type : String
141+
142+ property suggested_sort : Nil
143+
144+ property thumbnail : String
145+
146+ property thumbnail_height : Int64?
147+
148+ property thumbnail_width : Int64?
149+
150+ property title : String
151+
152+ property ups : Int64
153+
154+ property url : String
155+
156+ property user_reports : Array(JSON::Any?)
157+
158+ property view_count : Nil
159+
160+ property visited : Bool
161+end
162+
163+class Media
164+ include JSON::Serializable
165+
166+ @[JSON::Field(key: "type")]
167+ property media_type : String
168+
169+ property oembed : Oembed
170+end
171+
172+class Oembed
173+ include JSON::Serializable
174+
175+ property author_name : String
176+
177+ property author_url : String
178+
179+ property height : Int64
180+
181+ property html : String
182+
183+ @[JSON::Field(key: "type")]
184+ property oembed_type : String
185+
186+ property provider_name : String
187+
188+ property provider_url : String
189+
190+ property thumbnail_height : Int64
191+
192+ property thumbnail_url : String
193+
194+ property thumbnail_width : Int64
195+
196+ property title : String
197+
198+ property version : String
199+
200+ property width : Int64
201+end
202+
203+class MediaEmbed
204+ include JSON::Serializable
205+
206+ property content : String?
207+
208+ property height : Int64?
209+
210+ property scrolling : Bool?
211+
212+ property width : Int64?
213+end
214+
215+class Preview
216+ include JSON::Serializable
217+
218+ property enabled : Bool
219+
220+ property images : Array(Image)
221+end
222+
223+class Image
224+ include JSON::Serializable
225+
226+ property id : String
227+
228+ property resolutions : Array(Source)
229+
230+ property source : Source
231+
232+ property variants : Variants
233+end
234+
235+class Source
236+ include JSON::Serializable
237+
238+ property height : Int64
239+
240+ property url : String
241+
242+ property width : Int64
243+end
244+
245+class Variants
246+ include JSON::Serializable
247+
248+end
Test case

test/inputs/json/misc/4e336.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/54147.json

1 generated file · +40 −0
Acrystaldefault / TopLevel.cr+40 −0
@@ -0,0 +1,40 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property args : Args
7+
8+ property data : String
9+
10+ property files : Args
11+
12+ property form : Args
13+
14+ property headers : Headers
15+
16+ property origin : String
17+
18+ property url : String
19+end
20+
21+class Args
22+ include JSON::Serializable
23+
24+end
25+
26+class Headers
27+ include JSON::Serializable
28+
29+ @[JSON::Field(key: "Accept-Encoding")]
30+ property accept_encoding : String
31+
32+ @[JSON::Field(key: "Connection")]
33+ property connection : String
34+
35+ @[JSON::Field(key: "Host")]
36+ property host : String
37+
38+ @[JSON::Field(key: "User-Agent")]
39+ property user_agent : String
40+end
Test case

test/inputs/json/misc/54d32.json

1 generated file · +41 −0
Acrystaldefault / TopLevel.cr+41 −0
@@ -0,0 +1,41 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property count : Int64
7+
8+ property facets : Facets
9+
10+ property limit : Int64
11+
12+ property offset : Int64
13+
14+ property previous : Bool
15+
16+ property results : Array(Result)
17+
18+ @[JSON::Field(key: "next")]
19+ property top_level_next : String
20+end
21+
22+class Facets
23+ include JSON::Serializable
24+
25+end
26+
27+class Result
28+ include JSON::Serializable
29+
30+ property created_at : String
31+
32+ property id : String
33+
34+ property person_id : String
35+
36+ property representative_id : String
37+
38+ property status : String
39+
40+ property updated_at : String
41+end
Test case

test/inputs/json/misc/570ec.json

1 generated file · +57 −0
Acrystaldefault / TopLevel.cr+57 −0
@@ -0,0 +1,57 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(OtherName)
19+
20+ property superseded_by : Nil
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class OtherName
42+ include JSON::Serializable
43+
44+ property name : String
45+
46+ property note : String?
47+end
48+
49+class Text
50+ include JSON::Serializable
51+
52+ property media_type : String
53+
54+ property title : String
55+
56+ property url : String
57+end
Test case

test/inputs/json/misc/5dd0d.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/5eae5.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ @[JSON::Field(key: "Date")]
9+ property date : String
10+
11+ @[JSON::Field(key: "ID")]
12+ property id : Int64
13+
14+ @[JSON::Field(key: "Sponsor")]
15+ property sponsor : String
16+
17+ @[JSON::Field(key: "Title")]
18+ property title : String
19+end
Test case

test/inputs/json/misc/5eb20.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/5f3a1.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/5f7fe.json

1 generated file · +390 −0
Acrystaldefault / TopLevel.cr+390 −0
@@ -0,0 +1,390 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Array(Datum?))
7+
8+ property meta : Meta
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property view : View
15+end
16+
17+class View
18+ include JSON::Serializable
19+
20+ property attribution : String
21+
22+ @[JSON::Field(key: "attributionLink")]
23+ property attribution_link : String
24+
25+ @[JSON::Field(key: "averageRating")]
26+ property average_rating : Int64
27+
28+ property category : String
29+
30+ property columns : Array(Column)
31+
32+ @[JSON::Field(key: "createdAt")]
33+ property created_at : Int64
34+
35+ property description : String
36+
37+ @[JSON::Field(key: "displayType")]
38+ property display_type : String
39+
40+ @[JSON::Field(key: "downloadCount")]
41+ property download_count : Int64
42+
43+ property flags : Array(String)
44+
45+ property grants : Array(Grant)
46+
47+ @[JSON::Field(key: "hideFromCatalog")]
48+ property hide_from_catalog : Bool
49+
50+ @[JSON::Field(key: "hideFromDataJson")]
51+ property hide_from_data_json : Bool
52+
53+ property id : String
54+
55+ @[JSON::Field(key: "indexUpdatedAt")]
56+ property index_updated_at : Int64
57+
58+ property locale : String
59+
60+ property metadata : Metadata
61+
62+ property name : String
63+
64+ @[JSON::Field(key: "newBackend")]
65+ property new_backend : Bool
66+
67+ @[JSON::Field(key: "numberOfComments")]
68+ property number_of_comments : Int64
69+
70+ property oid : Int64
71+
72+ property owner : Owner
73+
74+ property provenance : String
75+
76+ @[JSON::Field(key: "publicationAppendEnabled")]
77+ property publication_append_enabled : Bool
78+
79+ @[JSON::Field(key: "publicationDate")]
80+ property publication_date : Int64
81+
82+ @[JSON::Field(key: "publicationGroup")]
83+ property publication_group : Int64
84+
85+ @[JSON::Field(key: "publicationStage")]
86+ property publication_stage : String
87+
88+ property query : Query
89+
90+ property rights : Array(String)
91+
92+ @[JSON::Field(key: "rowsUpdatedAt")]
93+ property rows_updated_at : Int64
94+
95+ @[JSON::Field(key: "rowsUpdatedBy")]
96+ property rows_updated_by : String
97+
98+ @[JSON::Field(key: "tableAuthor")]
99+ property table_author : Owner
100+
101+ @[JSON::Field(key: "tableId")]
102+ property table_id : Int64
103+
104+ property tags : Array(String)
105+
106+ @[JSON::Field(key: "totalTimesRated")]
107+ property total_times_rated : Int64
108+
109+ @[JSON::Field(key: "viewCount")]
110+ property view_count : Int64
111+
112+ @[JSON::Field(key: "viewLastModified")]
113+ property view_last_modified : Int64
114+
115+ @[JSON::Field(key: "viewType")]
116+ property view_type : String
117+end
118+
119+class Column
120+ include JSON::Serializable
121+
122+ @[JSON::Field(key: "cachedContents")]
123+ property cached_contents : CachedContents?
124+
125+ @[JSON::Field(key: "dataTypeName")]
126+ property data_type_name : String
127+
128+ @[JSON::Field(key: "fieldName")]
129+ property field_name : String
130+
131+ property flags : Array(String)?
132+
133+ property format : Format
134+
135+ property id : Int64
136+
137+ property name : String
138+
139+ property position : Int64
140+
141+ @[JSON::Field(key: "renderTypeName")]
142+ property render_type_name : String
143+
144+ @[JSON::Field(key: "tableColumnId")]
145+ property table_column_id : Int64?
146+
147+ property width : Int64?
148+end
149+
150+class CachedContents
151+ include JSON::Serializable
152+
153+ property largest : String
154+
155+ property non_null : Int64
156+
157+ property null : Int64
158+
159+ property smallest : String
160+
161+ property top : Array(Top)
162+end
163+
164+class Top
165+ include JSON::Serializable
166+
167+ property count : Int64
168+
169+ property item : String
170+end
171+
172+class Format
173+ include JSON::Serializable
174+
175+ property align : String?
176+
177+ property view : String?
178+end
179+
180+class Grant
181+ include JSON::Serializable
182+
183+ property flags : Array(String)
184+
185+ @[JSON::Field(key: "type")]
186+ property grant_type : String
187+
188+ property inherited : Bool
189+end
190+
191+class Metadata
192+ include JSON::Serializable
193+
194+ property attachments : Array(Attachment)
195+
196+ @[JSON::Field(key: "availableDisplayTypes")]
197+ property available_display_types : Array(String)
198+
199+ property custom_fields : CustomFields
200+
201+ @[JSON::Field(key: "jsonQuery")]
202+ property json_query : JsonQuery
203+
204+ @[JSON::Field(key: "rdfSubject")]
205+ property rdf_subject : String
206+
207+ @[JSON::Field(key: "renderTypeConfig")]
208+ property render_type_config : RenderTypeConfig
209+end
210+
211+class Attachment
212+ include JSON::Serializable
213+
214+ @[JSON::Field(key: "assetId")]
215+ property asset_id : String
216+
217+ @[JSON::Field(key: "blobId")]
218+ property blob_id : String
219+
220+ property filename : String
221+
222+ property name : String
223+end
224+
225+class CustomFields
226+ include JSON::Serializable
227+
228+ @[JSON::Field(key: "Additional Resources")]
229+ property additional_resources : AdditionalResources
230+
231+ @[JSON::Field(key: "Common Core")]
232+ property common_core : CommonCore
233+
234+ @[JSON::Field(key: "Dataset Information")]
235+ property dataset_information : DatasetInformation
236+
237+ @[JSON::Field(key: "Dataset Summary")]
238+ property dataset_summary : DatasetSummary
239+
240+ @[JSON::Field(key: "Notes")]
241+ property notes : Notes
242+end
243+
244+class AdditionalResources
245+ include JSON::Serializable
246+
247+ @[JSON::Field(key: "See Also ")]
248+ property additional_resources_see_also : String
249+
250+ @[JSON::Field(key: "See Also")]
251+ property see_also : String
252+end
253+
254+class CommonCore
255+ include JSON::Serializable
256+
257+ @[JSON::Field(key: "Contact Email")]
258+ property contact_email : String
259+
260+ @[JSON::Field(key: "Contact Name")]
261+ property contact_name : String
262+
263+ @[JSON::Field(key: "Publisher")]
264+ property publisher : String
265+end
266+
267+class DatasetInformation
268+ include JSON::Serializable
269+
270+ @[JSON::Field(key: "Agency")]
271+ property agency : String
272+end
273+
274+class DatasetSummary
275+ include JSON::Serializable
276+
277+ @[JSON::Field(key: "Contact Information")]
278+ property contact_information : String
279+
280+ @[JSON::Field(key: "Coverage")]
281+ property coverage : String
282+
283+ @[JSON::Field(key: "Data Frequency")]
284+ property data_frequency : String
285+
286+ @[JSON::Field(key: "Dataset Owner")]
287+ property dataset_owner : String
288+
289+ @[JSON::Field(key: "Granularity")]
290+ property granularity : String
291+
292+ @[JSON::Field(key: "Organization")]
293+ property organization : String
294+
295+ @[JSON::Field(key: "Posting Frequency")]
296+ property posting_frequency : String
297+
298+ @[JSON::Field(key: "Time Period")]
299+ property time_period : String
300+
301+ @[JSON::Field(key: "Units")]
302+ property units : String
303+end
304+
305+class Notes
306+ include JSON::Serializable
307+
308+ @[JSON::Field(key: "Notes")]
309+ property notes : String
310+end
311+
312+class JsonQuery
313+ include JSON::Serializable
314+
315+ property order : Array(Order)
316+end
317+
318+class Order
319+ include JSON::Serializable
320+
321+ property ascending : Bool
322+
323+ @[JSON::Field(key: "columnFieldName")]
324+ property column_field_name : String
325+end
326+
327+class RenderTypeConfig
328+ include JSON::Serializable
329+
330+ property visible : Visible
331+end
332+
333+class Visible
334+ include JSON::Serializable
335+
336+ property table : Bool
337+end
338+
339+class Owner
340+ include JSON::Serializable
341+
342+ @[JSON::Field(key: "displayName")]
343+ property display_name : String
344+
345+ property id : String
346+
347+ @[JSON::Field(key: "profileImageUrlLarge")]
348+ property profile_image_url_large : String
349+
350+ @[JSON::Field(key: "profileImageUrlMedium")]
351+ property profile_image_url_medium : String
352+
353+ @[JSON::Field(key: "profileImageUrlSmall")]
354+ property profile_image_url_small : String
355+
356+ property rights : Array(String)
357+
358+ @[JSON::Field(key: "roleName")]
359+ property role_name : String
360+
361+ @[JSON::Field(key: "screenName")]
362+ property screen_name : String
363+end
364+
365+class Query
366+ include JSON::Serializable
367+
368+ @[JSON::Field(key: "orderBys")]
369+ property order_bys : Array(OrderBy)
370+end
371+
372+class OrderBy
373+ include JSON::Serializable
374+
375+ property ascending : Bool
376+
377+ property expression : Expression
378+end
379+
380+class Expression
381+ include JSON::Serializable
382+
383+ @[JSON::Field(key: "columnId")]
384+ property column_id : Int64
385+
386+ @[JSON::Field(key: "type")]
387+ property expression_type : String
388+end
389+
390+alias Datum = Int64 | String
Test case

test/inputs/json/misc/617e8.json

1 generated file · +386 −0
Acrystaldefault / TopLevel.cr+386 −0
@@ -0,0 +1,386 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Array(Datum?))
7+
8+ property meta : Meta
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property view : View
15+end
16+
17+class View
18+ include JSON::Serializable
19+
20+ property attribution : String
21+
22+ @[JSON::Field(key: "attributionLink")]
23+ property attribution_link : String
24+
25+ @[JSON::Field(key: "averageRating")]
26+ property average_rating : Int64
27+
28+ property category : String
29+
30+ property columns : Array(Column)
31+
32+ @[JSON::Field(key: "createdAt")]
33+ property created_at : Int64
34+
35+ property description : String
36+
37+ @[JSON::Field(key: "displayType")]
38+ property display_type : String
39+
40+ @[JSON::Field(key: "downloadCount")]
41+ property download_count : Int64
42+
43+ property flags : Array(String)
44+
45+ property grants : Array(Grant)
46+
47+ @[JSON::Field(key: "hideFromCatalog")]
48+ property hide_from_catalog : Bool
49+
50+ @[JSON::Field(key: "hideFromDataJson")]
51+ property hide_from_data_json : Bool
52+
53+ property id : String
54+
55+ @[JSON::Field(key: "indexUpdatedAt")]
56+ property index_updated_at : Int64
57+
58+ property locale : String
59+
60+ property metadata : Metadata
61+
62+ property name : String
63+
64+ @[JSON::Field(key: "newBackend")]
65+ property new_backend : Bool
66+
67+ @[JSON::Field(key: "numberOfComments")]
68+ property number_of_comments : Int64
69+
70+ property oid : Int64
71+
72+ property owner : Owner
73+
74+ property provenance : String
75+
76+ @[JSON::Field(key: "publicationAppendEnabled")]
77+ property publication_append_enabled : Bool
78+
79+ @[JSON::Field(key: "publicationDate")]
80+ property publication_date : Int64
81+
82+ @[JSON::Field(key: "publicationGroup")]
83+ property publication_group : Int64
84+
85+ @[JSON::Field(key: "publicationStage")]
86+ property publication_stage : String
87+
88+ property query : Query
89+
90+ property rights : Array(String)
91+
92+ @[JSON::Field(key: "rowsUpdatedAt")]
93+ property rows_updated_at : Int64
94+
95+ @[JSON::Field(key: "rowsUpdatedBy")]
96+ property rows_updated_by : String
97+
98+ @[JSON::Field(key: "tableAuthor")]
99+ property table_author : Owner
100+
101+ @[JSON::Field(key: "tableId")]
102+ property table_id : Int64
103+
104+ property tags : Array(String)
105+
106+ @[JSON::Field(key: "totalTimesRated")]
107+ property total_times_rated : Int64
108+
109+ @[JSON::Field(key: "viewCount")]
110+ property view_count : Int64
111+
112+ @[JSON::Field(key: "viewLastModified")]
113+ property view_last_modified : Int64
114+
115+ @[JSON::Field(key: "viewType")]
116+ property view_type : String
117+end
118+
119+class Column
120+ include JSON::Serializable
121+
122+ @[JSON::Field(key: "cachedContents")]
123+ property cached_contents : CachedContents?
124+
125+ @[JSON::Field(key: "dataTypeName")]
126+ property data_type_name : String
127+
128+ property description : String?
129+
130+ @[JSON::Field(key: "fieldName")]
131+ property field_name : String
132+
133+ property flags : Array(String)?
134+
135+ property format : Format
136+
137+ property id : Int64
138+
139+ property name : String
140+
141+ property position : Int64
142+
143+ @[JSON::Field(key: "renderTypeName")]
144+ property render_type_name : String
145+
146+ @[JSON::Field(key: "tableColumnId")]
147+ property table_column_id : Int64?
148+
149+ property width : Int64?
150+end
151+
152+class CachedContents
153+ include JSON::Serializable
154+
155+ property largest : String
156+
157+ property non_null : Int64
158+
159+ property null : Int64
160+
161+ property smallest : String
162+
163+ property top : Array(Top)
164+end
165+
166+class Top
167+ include JSON::Serializable
168+
169+ property count : Int64
170+
171+ property item : String
172+end
173+
174+class Format
175+ include JSON::Serializable
176+
177+ property align : String?
178+
179+ property view : String?
180+end
181+
182+class Grant
183+ include JSON::Serializable
184+
185+ property flags : Array(String)
186+
187+ @[JSON::Field(key: "type")]
188+ property grant_type : String
189+
190+ property inherited : Bool
191+end
192+
193+class Metadata
194+ include JSON::Serializable
195+
196+ property attachments : Array(Attachment)
197+
198+ @[JSON::Field(key: "availableDisplayTypes")]
199+ property available_display_types : Array(String)
200+
201+ property custom_fields : CustomFields
202+
203+ @[JSON::Field(key: "jsonQuery")]
204+ property json_query : JsonQuery
205+
206+ @[JSON::Field(key: "rdfSubject")]
207+ property rdf_subject : String
208+
209+ @[JSON::Field(key: "renderTypeConfig")]
210+ property render_type_config : RenderTypeConfig
211+end
212+
213+class Attachment
214+ include JSON::Serializable
215+
216+ @[JSON::Field(key: "assetId")]
217+ property asset_id : String
218+
219+ @[JSON::Field(key: "blobId")]
220+ property blob_id : String
221+
222+ property filename : String
223+
224+ property name : String
225+end
226+
227+class CustomFields
228+ include JSON::Serializable
229+
230+ @[JSON::Field(key: "Additional Resources")]
231+ property additional_resources : AdditionalResources
232+
233+ @[JSON::Field(key: "Common Core")]
234+ property common_core : CommonCore
235+
236+ @[JSON::Field(key: "Dataset Information")]
237+ property dataset_information : DatasetInformation
238+
239+ @[JSON::Field(key: "Dataset Summary")]
240+ property dataset_summary : DatasetSummary
241+
242+ @[JSON::Field(key: "Notes")]
243+ property notes : Notes
244+end
245+
246+class AdditionalResources
247+ include JSON::Serializable
248+
249+ @[JSON::Field(key: "See Also")]
250+ property see_also : String
251+end
252+
253+class CommonCore
254+ include JSON::Serializable
255+
256+ @[JSON::Field(key: "Contact Email")]
257+ property contact_email : String
258+
259+ @[JSON::Field(key: "Contact Name")]
260+ property contact_name : String
261+
262+ @[JSON::Field(key: "Publisher")]
263+ property publisher : String
264+end
265+
266+class DatasetInformation
267+ include JSON::Serializable
268+
269+ @[JSON::Field(key: "Agency")]
270+ property agency : String
271+end
272+
273+class DatasetSummary
274+ include JSON::Serializable
275+
276+ @[JSON::Field(key: "Contact Information")]
277+ property contact_information : String
278+
279+ @[JSON::Field(key: "Coverage")]
280+ property coverage : String
281+
282+ @[JSON::Field(key: "Data Frequency")]
283+ property data_frequency : String
284+
285+ @[JSON::Field(key: "Dataset Owner")]
286+ property dataset_owner : String
287+
288+ @[JSON::Field(key: "Granularity")]
289+ property granularity : String
290+
291+ @[JSON::Field(key: "Organization")]
292+ property organization : String
293+
294+ @[JSON::Field(key: "Posting Frequency")]
295+ property posting_frequency : String
296+
297+ @[JSON::Field(key: "Time Period")]
298+ property time_period : String
299+end
300+
301+class Notes
302+ include JSON::Serializable
303+
304+ @[JSON::Field(key: "Notes")]
305+ property notes : String
306+end
307+
308+class JsonQuery
309+ include JSON::Serializable
310+
311+ property order : Array(Order)
312+end
313+
314+class Order
315+ include JSON::Serializable
316+
317+ property ascending : Bool
318+
319+ @[JSON::Field(key: "columnFieldName")]
320+ property column_field_name : String
321+end
322+
323+class RenderTypeConfig
324+ include JSON::Serializable
325+
326+ property visible : Visible
327+end
328+
329+class Visible
330+ include JSON::Serializable
331+
332+ property table : Bool
333+end
334+
335+class Owner
336+ include JSON::Serializable
337+
338+ @[JSON::Field(key: "displayName")]
339+ property display_name : String
340+
341+ property id : String
342+
343+ @[JSON::Field(key: "profileImageUrlLarge")]
344+ property profile_image_url_large : String
345+
346+ @[JSON::Field(key: "profileImageUrlMedium")]
347+ property profile_image_url_medium : String
348+
349+ @[JSON::Field(key: "profileImageUrlSmall")]
350+ property profile_image_url_small : String
351+
352+ property rights : Array(String)
353+
354+ @[JSON::Field(key: "roleName")]
355+ property role_name : String
356+
357+ @[JSON::Field(key: "screenName")]
358+ property screen_name : String
359+end
360+
361+class Query
362+ include JSON::Serializable
363+
364+ @[JSON::Field(key: "orderBys")]
365+ property order_bys : Array(OrderBy)
366+end
367+
368+class OrderBy
369+ include JSON::Serializable
370+
371+ property ascending : Bool
372+
373+ property expression : Expression
374+end
375+
376+class Expression
377+ include JSON::Serializable
378+
379+ @[JSON::Field(key: "columnId")]
380+ property column_id : Int64
381+
382+ @[JSON::Field(key: "type")]
383+ property expression_type : String
384+end
385+
386+alias Datum = Int64 | String
Test case

test/inputs/json/misc/61b66.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/6260a.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/65dec.json

1 generated file · +114 −0
Acrystaldefault / TopLevel.cr+114 −0
@@ -0,0 +1,114 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property booster : Array(String)
7+
8+ property border : String
9+
10+ property cards : Array(Card)
11+
12+ property code : String
13+
14+ @[JSON::Field(key: "gathererCode")]
15+ property gatherer_code : String
16+
17+ @[JSON::Field(key: "magicCardsInfoCode")]
18+ property magic_cards_info_code : String
19+
20+ property mkm_id : Int64
21+
22+ property mkm_name : String
23+
24+ property name : String
25+
26+ @[JSON::Field(key: "releaseDate")]
27+ property release_date : String
28+
29+ @[JSON::Field(key: "type")]
30+ property top_level_type : String
31+end
32+
33+class Card
34+ include JSON::Serializable
35+
36+ property artist : String
37+
38+ @[JSON::Field(key: "type")]
39+ property card_type : String
40+
41+ property cmc : Int64
42+
43+ @[JSON::Field(key: "colorIdentity")]
44+ property color_identity : Array(String)?
45+
46+ property colors : Array(String)?
47+
48+ property flavor : String?
49+
50+ property id : String
51+
52+ @[JSON::Field(key: "imageName")]
53+ property image_name : String
54+
55+ property layout : String
56+
57+ property legalities : Array(LegalityElement)
58+
59+ @[JSON::Field(key: "manaCost")]
60+ property mana_cost : String?
61+
62+ @[JSON::Field(key: "mciNumber")]
63+ property mci_number : String?
64+
65+ property multiverseid : Int64
66+
67+ property name : String
68+
69+ @[JSON::Field(key: "originalText")]
70+ property original_text : String
71+
72+ @[JSON::Field(key: "originalType")]
73+ property original_type : String
74+
75+ property power : String?
76+
77+ property printings : Array(String)
78+
79+ property rarity : String
80+
81+ property reserved : Bool?
82+
83+ property rulings : Array(Ruling)?
84+
85+ property subtypes : Array(String)?
86+
87+ property supertypes : Array(String)?
88+
89+ property text : String?
90+
91+ property toughness : String?
92+
93+ property types : Array(String)
94+
95+ property variations : Array(Int64)?
96+
97+ property watermark : String?
98+end
99+
100+class LegalityElement
101+ include JSON::Serializable
102+
103+ property format : String
104+
105+ property legality : String
106+end
107+
108+class Ruling
109+ include JSON::Serializable
110+
111+ property date : String
112+
113+ property text : String
114+end
Test case

test/inputs/json/misc/66121.json

1 generated file · +49 −0
Acrystaldefault / TopLevel.cr+49 −0
@@ -0,0 +1,49 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(JSON::Any?)
19+
20+ property superseded_by : String?
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class Text
42+ include JSON::Serializable
43+
44+ property media_type : String
45+
46+ property title : String
47+
48+ property url : String
49+end
Test case

test/inputs/json/misc/6617c.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property iss_position : IssPosition
7+
8+ property message : String
9+
10+ property timestamp : Int64
11+end
12+
13+class IssPosition
14+ include JSON::Serializable
15+
16+ property latitude : String
17+
18+ property longitude : String
19+end
Test case

test/inputs/json/misc/67c03.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property message : String
7+
8+ property number : Int64
9+
10+ property people : Array(Person)
11+end
12+
13+class Person
14+ include JSON::Serializable
15+
16+ property craft : String
17+
18+ property name : String
19+end
Test case

test/inputs/json/misc/68c30.json

1 generated file · +65 −0
Acrystaldefault / TopLevel.cr+65 −0
@@ -0,0 +1,65 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property txs : Array(Tx)
7+end
8+
9+class Tx
10+ include JSON::Serializable
11+
12+ property double_spend : Bool
13+
14+ property hash : String
15+
16+ property inputs : Array(Input)
17+
18+ property lock_time : Int64
19+
20+ property relayed_by : String
21+
22+ property size : Int64
23+
24+ property time : Int64
25+
26+ property tx_index : Int64
27+
28+ @[JSON::Field(key: "out")]
29+ property tx_out : Array(Out)
30+
31+ property ver : Int64
32+
33+ property vin_sz : Int64
34+
35+ property vout_sz : Int64
36+end
37+
38+class Input
39+ include JSON::Serializable
40+
41+ property prev_out : Out
42+
43+ property script : String
44+
45+ property sequence : Float64
46+end
47+
48+class Out
49+ include JSON::Serializable
50+
51+ property addr : String
52+
53+ property n : Int64
54+
55+ @[JSON::Field(key: "type")]
56+ property out_type : Int64
57+
58+ property script : String
59+
60+ property spent : Bool
61+
62+ property tx_index : Int64
63+
64+ property value : Float64
65+end
Test case

test/inputs/json/misc/6c155.json

1 generated file · +104 −0
Acrystaldefault / TopLevel.cr+104 −0
@@ -0,0 +1,104 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property metadata : Metadata
7+
8+ property results : Array(Result)
9+end
10+
11+class Metadata
12+ include JSON::Serializable
13+
14+ @[JSON::Field(key: "executionTime")]
15+ property execution_time : Float64
16+
17+ @[JSON::Field(key: "responseInfo")]
18+ property response_info : ResponseInfo
19+
20+ property resultset : Resultset
21+end
22+
23+class ResponseInfo
24+ include JSON::Serializable
25+
26+ @[JSON::Field(key: "developerMessage")]
27+ property developer_message : String
28+
29+ property status : Int64
30+end
31+
32+class Resultset
33+ include JSON::Serializable
34+
35+ property count : Int64
36+
37+ property page : Int64
38+
39+ property pagesize : Int64
40+end
41+
42+class Result
43+ include JSON::Serializable
44+
45+ property attachment : Array(JSON::Any?)
46+
47+ property body : String
48+
49+ property changed : String
50+
51+ property component : Array(Component)
52+
53+ property created : String
54+
55+ property date : String
56+
57+ property image : Array(JSON::Any?)
58+
59+ property location : Location
60+
61+ property teaser : Nil
62+
63+ property title : String
64+
65+ property topic : Array(JSON::Any?)
66+
67+ property url : String
68+
69+ property uuid : String
70+
71+ property vuuid : String
72+end
73+
74+class Component
75+ include JSON::Serializable
76+
77+ property name : String
78+
79+ property uuid : String
80+end
81+
82+class Location
83+ include JSON::Serializable
84+
85+ property administrative_area : String
86+
87+ property country : String
88+
89+ property fax_number : String
90+
91+ property locality : String
92+
93+ property mobile_number : String
94+
95+ property phone_number : String
96+
97+ property phone_number_extension : String
98+
99+ property postal_code : String
100+
101+ property sub_premise : Nil
102+
103+ property thoroughfare : String
104+end
Test case

test/inputs/json/misc/6de06.json

1 generated file · +261 −0
Acrystaldefault / TopLevel.cr+261 −0
@@ -0,0 +1,261 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : TopLevelData
7+
8+ property kind : String
9+end
10+
11+class TopLevelData
12+ include JSON::Serializable
13+
14+ property after : String
15+
16+ property before : Nil
17+
18+ property children : Array(Child)
19+
20+ property modhash : String
21+end
22+
23+class Child
24+ include JSON::Serializable
25+
26+ property data : ChildData
27+
28+ property kind : String
29+end
30+
31+class ChildData
32+ include JSON::Serializable
33+
34+ property approved_at_utc : Nil
35+
36+ property approved_by : Nil
37+
38+ property archived : Bool
39+
40+ property author : String
41+
42+ property author_flair_css_class : String?
43+
44+ property author_flair_text : String?
45+
46+ property banned_at_utc : Nil
47+
48+ property banned_by : Nil
49+
50+ property brand_safe : Bool
51+
52+ property can_gild : Bool
53+
54+ property can_mod_post : Bool
55+
56+ property clicked : Bool
57+
58+ property contest_mode : Bool
59+
60+ property created : Float64
61+
62+ property created_utc : Float64
63+
64+ property distinguished : Nil
65+
66+ property domain : String
67+
68+ property downs : Int64
69+
70+ property edited : Bool
71+
72+ property gilded : Int64
73+
74+ property hidden : Bool
75+
76+ property hide_score : Bool
77+
78+ property id : String
79+
80+ property is_self : Bool
81+
82+ property is_video : Bool
83+
84+ property likes : Nil
85+
86+ property link_flair_css_class : String?
87+
88+ property link_flair_text : String?
89+
90+ property locked : Bool
91+
92+ property media : Media?
93+
94+ property media_embed : MediaEmbed
95+
96+ property mod_reports : Array(JSON::Any?)
97+
98+ property name : String
99+
100+ property num_comments : Int64
101+
102+ property num_reports : Nil
103+
104+ property over_18 : Bool
105+
106+ property permalink : String
107+
108+ property post_hint : String?
109+
110+ property preview : Preview?
111+
112+ property quarantine : Bool
113+
114+ property removal_reason : Nil
115+
116+ property report_reasons : Nil
117+
118+ property saved : Bool
119+
120+ property score : Int64
121+
122+ property secure_media : Media?
123+
124+ property secure_media_embed : MediaEmbed
125+
126+ property selftext : String
127+
128+ property selftext_html : String?
129+
130+ property spoiler : Bool
131+
132+ property stickied : Bool
133+
134+ property subreddit : String
135+
136+ property subreddit_id : String
137+
138+ property subreddit_name_prefixed : String
139+
140+ property subreddit_type : String
141+
142+ property suggested_sort : String?
143+
144+ property thumbnail : String
145+
146+ property thumbnail_height : Int64?
147+
148+ property thumbnail_width : Int64?
149+
150+ property title : String
151+
152+ property ups : Int64
153+
154+ property url : String
155+
156+ property user_reports : Array(JSON::Any?)
157+
158+ property view_count : Nil
159+
160+ property visited : Bool
161+end
162+
163+class Media
164+ include JSON::Serializable
165+
166+ @[JSON::Field(key: "type")]
167+ property media_type : String
168+
169+ property oembed : Oembed
170+end
171+
172+class Oembed
173+ include JSON::Serializable
174+
175+ property description : String
176+
177+ property height : Int64
178+
179+ property html : String
180+
181+ @[JSON::Field(key: "type")]
182+ property oembed_type : String
183+
184+ property provider_name : String
185+
186+ property provider_url : String
187+
188+ property thumbnail_height : Int64
189+
190+ property thumbnail_url : String
191+
192+ property thumbnail_width : Int64
193+
194+ property title : String
195+
196+ property version : String
197+
198+ property width : Int64
199+end
200+
201+class MediaEmbed
202+ include JSON::Serializable
203+
204+ property content : String?
205+
206+ property height : Int64?
207+
208+ property scrolling : Bool?
209+
210+ property width : Int64?
211+end
212+
213+class Preview
214+ include JSON::Serializable
215+
216+ property enabled : Bool
217+
218+ property images : Array(Image)
219+end
220+
221+class Image
222+ include JSON::Serializable
223+
224+ property id : String
225+
226+ property resolutions : Array(Source)
227+
228+ property source : Source
229+
230+ property variants : Variants
231+end
232+
233+class Source
234+ include JSON::Serializable
235+
236+ property height : Int64
237+
238+ property url : String
239+
240+ property width : Int64
241+end
242+
243+class Variants
244+ include JSON::Serializable
245+
246+ property gif : Gif?
247+
248+ property mp4 : Gif?
249+
250+ property nsfw : Gif?
251+
252+ property obfuscated : Gif?
253+end
254+
255+class Gif
256+ include JSON::Serializable
257+
258+ property resolutions : Array(Source)
259+
260+ property source : Source
261+end
Test case

test/inputs/json/misc/6dec6.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/6eb00.json

1 generated file · +16 −0
Acrystaldefault / TopLevel.cr+16 −0
@@ -0,0 +1,16 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ @[JSON::Field(key: "DirectorateID")]
9+ property directorate_id : Int64
10+
11+ @[JSON::Field(key: "Id")]
12+ property id : Int64
13+
14+ @[JSON::Field(key: "Name")]
15+ property name : String
16+end
Test case

test/inputs/json/misc/70c77.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/734ad.json

1 generated file · +145 −0
Acrystaldefault / TopLevel.cr+145 −0
@@ -0,0 +1,145 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property count : Int64
7+
8+ property facets : Facets
9+
10+ property limit : Int64
11+
12+ property offset : Int64
13+
14+ property previous : Bool
15+
16+ property results : Array(Result)
17+
18+ @[JSON::Field(key: "next")]
19+ property top_level_next : String
20+end
21+
22+class Facets
23+ include JSON::Serializable
24+
25+end
26+
27+class Result
28+ include JSON::Serializable
29+
30+ property acronym : String?
31+
32+ property activity_consult_committees : String
33+
34+ property activity_eu_legislative : String
35+
36+ property activity_expert_groups : String
37+
38+ property activity_high_level_groups : String
39+
40+ property activity_industry_forums : String
41+
42+ property activity_inter_groups : String
43+
44+ property activity_other : String?
45+
46+ property activity_relevant_comm : String
47+
48+ property be_office_country : String?
49+
50+ property be_office_lat : Float64?
51+
52+ property be_office_lon : Float64?
53+
54+ property be_office_phone : String?
55+
56+ property be_office_post_code : String?
57+
58+ property be_office_postbox : String?
59+
60+ property be_office_street : String?
61+
62+ property be_office_town : String?
63+
64+ property code_of_conduct : String
65+
66+ property contact_country : Int64
67+
68+ property created_at : String
69+
70+ property entity : String
71+
72+ property goals : String
73+
74+ property head : String
75+
76+ property head_office_country : String
77+
78+ property head_office_lat : Float64?
79+
80+ property head_office_lon : Float64?
81+
82+ property head_office_phone : String
83+
84+ property head_office_post_code : String?
85+
86+ property head_office_postbox : String?
87+
88+ property head_office_street : String
89+
90+ property head_office_town : String
91+
92+ property id : String
93+
94+ property identification_code : String
95+
96+ property info_members : String
97+
98+ property last_update_date : String
99+
100+ property legal : String
101+
102+ property legal_status : String
103+
104+ property main_category : Int64
105+
106+ property main_category_title : String
107+
108+ property members : Int64
109+
110+ property members_100 : Int64?
111+
112+ property members_25 : Int64?
113+
114+ property members_50 : Int64?
115+
116+ property members_75 : Int64?
117+
118+ property members_fte : Float64
119+
120+ property name : String
121+
122+ property native_name : Nil
123+
124+ property networking : String?
125+
126+ property number_of_natural_persons : Int64?
127+
128+ property other_code_of_conduct : String?
129+
130+ property registration_date : String
131+
132+ property status : String
133+
134+ property structure_members : String
135+
136+ property sub_category : Int64
137+
138+ property sub_category_title : String
139+
140+ property updated_at : String
141+
142+ property uri : String
143+
144+ property web_site_url : String?
145+end
Test case

test/inputs/json/misc/75912.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/7681c.json

1 generated file · +195 −0
Acrystaldefault / TopLevel.cr+195 −0
@@ -0,0 +1,195 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Datum)
7+
8+ property meta : Meta
9+
10+ property pagination : Pagination
11+end
12+
13+class Datum
14+ include JSON::Serializable
15+
16+ property bitly_gif_url : String
17+
18+ property bitly_url : String
19+
20+ property content_url : String
21+
22+ @[JSON::Field(key: "type")]
23+ property datum_type : String
24+
25+ property embed_url : String
26+
27+ property id : String
28+
29+ property images : Images
30+
31+ property import_datetime : String
32+
33+ property is_indexable : Int64
34+
35+ property rating : String
36+
37+ property slug : String
38+
39+ property source : String
40+
41+ property source_post_url : String
42+
43+ property source_tld : String
44+
45+ property trending_datetime : String
46+
47+ property url : String
48+
49+ property user : User?
50+
51+ property username : String
52+end
53+
54+class Images
55+ include JSON::Serializable
56+
57+ property downsized : Downsized
58+
59+ property downsized_large : Downsized
60+
61+ property downsized_medium : Downsized
62+
63+ property downsized_small : DownsizedSmall
64+
65+ property downsized_still : Downsized
66+
67+ property fixed_height : FixedHeight
68+
69+ property fixed_height_downsampled : FixedHeight
70+
71+ property fixed_height_small : FixedHeight
72+
73+ property fixed_height_small_still : Downsized
74+
75+ property fixed_height_still : Downsized
76+
77+ property fixed_width : FixedHeight
78+
79+ property fixed_width_downsampled : FixedHeight
80+
81+ property fixed_width_small : FixedHeight
82+
83+ property fixed_width_small_still : Downsized
84+
85+ property fixed_width_still : Downsized
86+
87+ property looping : Looping
88+
89+ property original : FixedHeight
90+
91+ property original_mp4 : DownsizedSmall
92+
93+ property original_still : Downsized
94+
95+ property preview : DownsizedSmall
96+
97+ property preview_gif : Downsized
98+
99+ property preview_webp : Downsized
100+
101+ @[JSON::Field(key: "480w_still")]
102+ property the_480_w_still : Downsized?
103+end
104+
105+class Downsized
106+ include JSON::Serializable
107+
108+ property height : String
109+
110+ property size : String?
111+
112+ property url : String
113+
114+ property width : String
115+end
116+
117+class DownsizedSmall
118+ include JSON::Serializable
119+
120+ property height : String
121+
122+ property mp4 : String
123+
124+ property mp4_size : String
125+
126+ property width : String
127+end
128+
129+class FixedHeight
130+ include JSON::Serializable
131+
132+ property frames : String?
133+
134+ property hash : String?
135+
136+ property height : String
137+
138+ property mp4 : String?
139+
140+ property mp4_size : String?
141+
142+ property size : String
143+
144+ property url : String
145+
146+ property webp : String
147+
148+ property webp_size : String
149+
150+ property width : String
151+end
152+
153+class Looping
154+ include JSON::Serializable
155+
156+ property mp4 : String
157+
158+ property mp4_size : String
159+end
160+
161+class User
162+ include JSON::Serializable
163+
164+ property avatar_url : String
165+
166+ property banner_url : String
167+
168+ property display_name : String
169+
170+ property profile_url : String
171+
172+ property twitter : String?
173+
174+ property username : String
175+end
176+
177+class Meta
178+ include JSON::Serializable
179+
180+ property msg : String
181+
182+ property response_id : String
183+
184+ property status : Int64
185+end
186+
187+class Pagination
188+ include JSON::Serializable
189+
190+ property count : Int64
191+
192+ property offset : Int64
193+
194+ property total_count : Int64
195+end
Test case

test/inputs/json/misc/76ae1.json

1 generated file · +344 −0
Acrystaldefault / TopLevel.cr+344 −0
@@ -0,0 +1,344 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "basePath")]
7+ property base_path : String
8+
9+ property definitions : Definitions
10+
11+ property host : String
12+
13+ property info : Info
14+
15+ property paths : Paths
16+
17+ property produces : Array(String)
18+
19+ property schemes : Array(String)
20+
21+ property swagger : String
22+end
23+
24+class Definitions
25+ include JSON::Serializable
26+
27+ @[JSON::Field(key: "Article")]
28+ property article : Article
29+
30+ @[JSON::Field(key: "Center")]
31+ property center : Article
32+
33+ @[JSON::Field(key: "DeMinimis")]
34+ property de_minimis : DeMinimis
35+
36+ @[JSON::Field(key: "Event")]
37+ property event : Article
38+
39+ @[JSON::Field(key: "FAQ")]
40+ property faq : Faq
41+
42+ @[JSON::Field(key: "Lead")]
43+ property lead : Article
44+
45+ @[JSON::Field(key: "List")]
46+ property list : Article
47+
48+ @[JSON::Field(key: "MarketIntelligence")]
49+ property market_intelligence : Article
50+
51+ @[JSON::Field(key: "Office")]
52+ property office : Article
53+
54+ @[JSON::Field(key: "Provider")]
55+ property provider : Article
56+
57+ @[JSON::Field(key: "Rate")]
58+ property rate : Article
59+
60+ @[JSON::Field(key: "Report")]
61+ property report : Report
62+
63+ @[JSON::Field(key: "Taxonomy")]
64+ property taxonomy : Taxonomy
65+end
66+
67+class Article
68+ include JSON::Serializable
69+
70+ property properties : Hash(String, Property)
71+end
72+
73+class Property
74+ include JSON::Serializable
75+
76+ property description : String
77+
78+ @[JSON::Field(key: "type")]
79+ property property_type : String
80+end
81+
82+class DeMinimis
83+ include JSON::Serializable
84+
85+ property properties : DeMinimisProperties
86+end
87+
88+class DeMinimisProperties
89+ include JSON::Serializable
90+
91+ property countries : Property
92+
93+ property country : Property
94+
95+ property de_minimis_currency : Property
96+
97+ property de_minimis_value : Property
98+
99+ property notes : Property
100+
101+ property vat_amount : Property
102+
103+ property vat_currency : Property
104+end
105+
106+class Faq
107+ include JSON::Serializable
108+
109+ property properties : FaqProperties
110+end
111+
112+class FaqProperties
113+ include JSON::Serializable
114+
115+ property answer : Property
116+
117+ property countries : Property
118+
119+ property first_published_date : Property
120+
121+ property id : Property
122+
123+ property industries : Property
124+
125+ property last_published_date : Property
126+
127+ property question : Property
128+
129+ property topics : Property
130+
131+ property trade_regions : Property
132+
133+ property url : Property
134+
135+ property world_regions : Property
136+end
137+
138+class Report
139+ include JSON::Serializable
140+
141+ property properties : ReportProperties
142+end
143+
144+class ReportProperties
145+ include JSON::Serializable
146+
147+ property countries : Property
148+
149+ property description : Property
150+
151+ property expiration_date : Property
152+
153+ property id : Property
154+
155+ property industries : Property
156+
157+ property ita_industries : Property
158+
159+ property report_type : Property
160+
161+ property title : Property
162+
163+ property url : Property
164+end
165+
166+class Taxonomy
167+ include JSON::Serializable
168+
169+ property properties : TaxonomyProperties
170+end
171+
172+class TaxonomyProperties
173+ include JSON::Serializable
174+
175+ property annotations : Property
176+
177+ property datatype_properties : Property
178+
179+ property id : Property
180+
181+ property label : Property
182+
183+ @[JSON::Field(key: "type")]
184+ property properties_type : Property
185+
186+ property sub_class_of : Property
187+end
188+
189+class Info
190+ include JSON::Serializable
191+
192+ property description : String
193+
194+ property title : String
195+
196+ property version : String
197+end
198+
199+class Paths
200+ include JSON::Serializable
201+
202+ @[JSON::Field(key: "/business_service_providers/search")]
203+ property business_service_providers_search : BusinessServiceProvidersSearchClass
204+
205+ @[JSON::Field(key: "/consolidated_screening_list/search")]
206+ property consolidated_screening_list_search : ConsolidatedScreeningListSearchClass
207+
208+ @[JSON::Field(key: "/de_minimis/search")]
209+ property de_minimis_search : ConsolidatedScreeningListSearchClass
210+
211+ @[JSON::Field(key: "/ita_faqs/search")]
212+ property ita_faqs_search : ConsolidatedScreeningListSearchClass
213+
214+ @[JSON::Field(key: "/ita_office_locations/search")]
215+ property ita_office_locations_search : ConsolidatedScreeningListSearchClass
216+
217+ @[JSON::Field(key: "/ita_taxonomies/search")]
218+ property ita_taxonomies_search : BusinessServiceProvidersSearchClass
219+
220+ @[JSON::Field(key: "/ita_zipcode_to_post/search")]
221+ property ita_zipcode_to_post_search : BusinessServiceProvidersSearchClass
222+
223+ @[JSON::Field(key: "/market_intelligence/search")]
224+ property market_intelligence_search : ConsolidatedScreeningListSearchClass
225+
226+ @[JSON::Field(key: "/market_research_library/search")]
227+ property market_research_library_search : ConsolidatedScreeningListSearchClass
228+
229+ @[JSON::Field(key: "/tariff_rates/search")]
230+ property tariff_rates_search : ConsolidatedScreeningListSearchClass
231+
232+ @[JSON::Field(key: "/trade_articles/search")]
233+ property trade_articles_search : ConsolidatedScreeningListSearchClass
234+
235+ @[JSON::Field(key: "/trade_events/search")]
236+ property trade_events_search : ConsolidatedScreeningListSearchClass
237+
238+ @[JSON::Field(key: "/trade_leads/search")]
239+ property trade_leads_search : ConsolidatedScreeningListSearchClass
240+end
241+
242+class BusinessServiceProvidersSearchClass
243+ include JSON::Serializable
244+
245+ property get : BusinessServiceProvidersSearchGet
246+end
247+
248+class BusinessServiceProvidersSearchGet
249+ include JSON::Serializable
250+
251+ property description : String
252+
253+ property parameters : Array(Parameter)
254+
255+ property responses : PurpleResponses
256+
257+ property summary : String
258+
259+ property tags : Array(String)
260+end
261+
262+class Parameter
263+ include JSON::Serializable
264+
265+ property description : String
266+
267+ property format : String
268+
269+ property name : String
270+
271+ @[JSON::Field(key: "in")]
272+ property parameter_in : String
273+
274+ @[JSON::Field(key: "type")]
275+ property parameter_type : String
276+
277+ property required : Bool
278+end
279+
280+class PurpleResponses
281+ include JSON::Serializable
282+
283+ @[JSON::Field(key: "200")]
284+ property the_200 : Purple200
285+end
286+
287+class Purple200
288+ include JSON::Serializable
289+
290+ property description : String
291+
292+ property schema : ItemsClass
293+end
294+
295+class ItemsClass
296+ include JSON::Serializable
297+
298+ @[JSON::Field(key: "$ref")]
299+ property ref : String
300+end
301+
302+class ConsolidatedScreeningListSearchClass
303+ include JSON::Serializable
304+
305+ property get : ConsolidatedScreeningListSearchGet
306+end
307+
308+class ConsolidatedScreeningListSearchGet
309+ include JSON::Serializable
310+
311+ property description : String
312+
313+ property parameters : Array(Parameter)
314+
315+ property responses : FluffyResponses
316+
317+ property summary : String
318+
319+ property tags : Array(String)
320+end
321+
322+class FluffyResponses
323+ include JSON::Serializable
324+
325+ @[JSON::Field(key: "200")]
326+ property the_200 : Fluffy200
327+end
328+
329+class Fluffy200
330+ include JSON::Serializable
331+
332+ property description : String
333+
334+ property schema : PurpleSchema
335+end
336+
337+class PurpleSchema
338+ include JSON::Serializable
339+
340+ property items : ItemsClass
341+
342+ @[JSON::Field(key: "type")]
343+ property schema_type : String
344+end
Test case

test/inputs/json/misc/77392.json

1 generated file · +27 −0
Acrystaldefault / TopLevel.cr+27 −0
@@ -0,0 +1,27 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property designation : String
9+
10+ property discovery_date : String
11+
12+ property h_mag : String?
13+
14+ property i_deg : String
15+
16+ property moid_au : String
17+
18+ property orbit_class : String
19+
20+ property period_yr : String?
21+
22+ property pha : String
23+
24+ property q_au_1 : String
25+
26+ property q_au_2 : String?
27+end
Test case

test/inputs/json/misc/7d397.json

1 generated file · +130 −0
Acrystaldefault / TopLevel.cr+130 −0
@@ -0,0 +1,130 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "basePath")]
7+ property base_path : String
8+
9+ property definitions : Definitions
10+
11+ property host : String
12+
13+ property info : Info
14+
15+ property paths : Paths
16+
17+ property produces : Array(String)
18+
19+ property schemes : Array(String)
20+
21+ property swagger : String
22+end
23+
24+class Definitions
25+ include JSON::Serializable
26+
27+ @[JSON::Field(key: "List")]
28+ property list : List
29+end
30+
31+class List
32+ include JSON::Serializable
33+
34+ property properties : Hash(String, Property)
35+end
36+
37+class Property
38+ include JSON::Serializable
39+
40+ property description : String
41+
42+ @[JSON::Field(key: "type")]
43+ property property_type : String
44+end
45+
46+class Info
47+ include JSON::Serializable
48+
49+ property description : String
50+
51+ property title : String
52+
53+ property version : String
54+end
55+
56+class Paths
57+ include JSON::Serializable
58+
59+ @[JSON::Field(key: "/consolidated_screening_list/search")]
60+ property consolidated_screening_list_search : ConsolidatedScreeningListSearch
61+end
62+
63+class ConsolidatedScreeningListSearch
64+ include JSON::Serializable
65+
66+ property get : Get
67+end
68+
69+class Get
70+ include JSON::Serializable
71+
72+ property description : String
73+
74+ property parameters : Array(Parameter)
75+
76+ property responses : Responses
77+
78+ property summary : String
79+
80+ property tags : Array(String)
81+end
82+
83+class Parameter
84+ include JSON::Serializable
85+
86+ property description : String
87+
88+ property format : String
89+
90+ property name : String
91+
92+ @[JSON::Field(key: "in")]
93+ property parameter_in : String
94+
95+ @[JSON::Field(key: "type")]
96+ property parameter_type : String
97+
98+ property required : Bool
99+end
100+
101+class Responses
102+ include JSON::Serializable
103+
104+ @[JSON::Field(key: "200")]
105+ property the_200 : The200
106+end
107+
108+class The200
109+ include JSON::Serializable
110+
111+ property description : String
112+
113+ property schema : Schema
114+end
115+
116+class Schema
117+ include JSON::Serializable
118+
119+ property items : Items
120+
121+ @[JSON::Field(key: "type")]
122+ property schema_type : String
123+end
124+
125+class Items
126+ include JSON::Serializable
127+
128+ @[JSON::Field(key: "$ref")]
129+ property ref : String
130+end
Test case

test/inputs/json/misc/7d722.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/7df41.json

1 generated file · +25 −0
Acrystaldefault / TopLevel.cr+25 −0
@@ -0,0 +1,25 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property pc : Pc
7+
8+ property ps3 : Pc
9+
10+ property ps4 : Pc
11+
12+ property xbox : Pc
13+
14+ property xone : Pc
15+end
16+
17+class Pc
18+ include JSON::Serializable
19+
20+ property count : Int64
21+
22+ property label : String
23+
24+ property peak24 : Int64
25+end
Test case

test/inputs/json/misc/7dfa6.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/7eb30.json

1 generated file · +58 −0
Acrystaldefault / TopLevel.cr+58 −0
@@ -0,0 +1,58 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property count : Int64
7+
8+ property previous : Nil
9+
10+ property results : Array(Result)
11+
12+ @[JSON::Field(key: "next")]
13+ property top_level_next : String
14+end
15+
16+class Result
17+ include JSON::Serializable
18+
19+ property code : String
20+
21+ property english : String
22+
23+ property fav : Bool
24+
25+ property group : Group
26+
27+ property location : String
28+
29+ property min_screens : Int64
30+
31+ property num_views : Int64
32+
33+ property showtimes : String
34+
35+ property stars : Int64
36+
37+ property tel : String
38+
39+ property thai : String
40+
41+ property today_screens : Int64
42+
43+ property url : String
44+
45+ property website : String
46+end
47+
48+class Group
49+ include JSON::Serializable
50+
51+ property code : String
52+
53+ property english : String
54+
55+ property thai : String
56+
57+ property website : String
58+end
Test case

test/inputs/json/misc/7f568.json

1 generated file · +54 −0
Acrystaldefault / TopLevel.cr+54 −0
@@ -0,0 +1,54 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property comments : Int64
9+
10+ property comments_url : String
11+
12+ property commits_url : String
13+
14+ property created_at : String
15+
16+ property description : String?
17+
18+ property files : Hash(String, FileValue)
19+
20+ property forks_url : String
21+
22+ property git_pull_url : String
23+
24+ property git_push_url : String
25+
26+ property html_url : String
27+
28+ property id : String
29+
30+ property public : Bool
31+
32+ property truncated : Bool
33+
34+ property updated_at : String
35+
36+ property url : String
37+
38+ property user : Nil
39+end
40+
41+class FileValue
42+ include JSON::Serializable
43+
44+ @[JSON::Field(key: "type")]
45+ property file_type : String
46+
47+ property filename : String
48+
49+ property language : String?
50+
51+ property raw_url : String
52+
53+ property size : Int64
54+end
Test case

test/inputs/json/misc/7fbfb.json

1 generated file · +39 −0
Acrystaldefault / TopLevel.cr+39 −0
@@ -0,0 +1,39 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelUnion)
4+
5+class PurpleTopLevel
6+ include JSON::Serializable
7+
8+ property country : Country
9+
10+ property date : String
11+
12+ property decimal : String
13+
14+ property indicator : Country
15+
16+ property value : String
17+end
18+
19+class Country
20+ include JSON::Serializable
21+
22+ property id : String
23+
24+ property value : String
25+end
26+
27+class FluffyTopLevel
28+ include JSON::Serializable
29+
30+ property page : Int64
31+
32+ property pages : Int64
33+
34+ property per_page : String
35+
36+ property total : Int64
37+end
38+
39+alias TopLevelUnion = FluffyTopLevel | Array(PurpleTopLevel)
Test case

test/inputs/json/misc/80aff.json

1 generated file · +43 −0
Acrystaldefault / TopLevel.cr+43 −0
@@ -0,0 +1,43 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property count : Int64
7+
8+ property facets : Facets
9+
10+ property limit : Int64
11+
12+ property offset : Int64
13+
14+ property previous : Bool
15+
16+ property results : Array(Result)
17+
18+ @[JSON::Field(key: "next")]
19+ property top_level_next : Bool
20+end
21+
22+class Facets
23+ include JSON::Serializable
24+
25+end
26+
27+class Result
28+ include JSON::Serializable
29+
30+ property created_at : String
31+
32+ property id : Int64
33+
34+ property items : Int64
35+
36+ property name : String
37+
38+ property parent : Int64?
39+
40+ property updated_at : String
41+
42+ property uri : String
43+end
Test case

test/inputs/json/misc/82509.json

1 generated file · +7 −0
Acrystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property origin : String
7+end
Test case

test/inputs/json/misc/8592b.json

1 generated file · +196 −0
Acrystaldefault / TopLevel.cr+196 −0
@@ -0,0 +1,196 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : TopLevelData
7+
8+ property kind : String
9+end
10+
11+class TopLevelData
12+ include JSON::Serializable
13+
14+ property after : String
15+
16+ property before : Nil
17+
18+ property children : Array(Child)
19+
20+ property modhash : String
21+end
22+
23+class Child
24+ include JSON::Serializable
25+
26+ property data : ChildData
27+
28+ property kind : String
29+end
30+
31+class ChildData
32+ include JSON::Serializable
33+
34+ property approved_at_utc : Nil
35+
36+ property approved_by : Nil
37+
38+ property archived : Bool
39+
40+ property author : String
41+
42+ property author_flair_css_class : String?
43+
44+ property author_flair_text : String?
45+
46+ property banned_at_utc : Nil
47+
48+ property banned_by : Nil
49+
50+ property brand_safe : Bool
51+
52+ property can_gild : Bool
53+
54+ property can_mod_post : Bool
55+
56+ property clicked : Bool
57+
58+ property contest_mode : Bool
59+
60+ property created : Float64
61+
62+ property created_utc : Float64
63+
64+ property distinguished : Nil
65+
66+ property domain : String
67+
68+ property downs : Int64
69+
70+ property edited : Bool
71+
72+ property gilded : Int64
73+
74+ property hidden : Bool
75+
76+ property hide_score : Bool
77+
78+ property id : String
79+
80+ property is_self : Bool
81+
82+ property is_video : Bool
83+
84+ property likes : Nil
85+
86+ property link_flair_css_class : String
87+
88+ property link_flair_text : String
89+
90+ property locked : Bool
91+
92+ property media : Nil
93+
94+ property media_embed : MediaEmbed
95+
96+ property mod_reports : Array(JSON::Any?)
97+
98+ property name : String
99+
100+ property num_comments : Int64
101+
102+ property num_reports : Nil
103+
104+ property over_18 : Bool
105+
106+ property permalink : String
107+
108+ property post_hint : String?
109+
110+ property preview : Preview?
111+
112+ property quarantine : Bool
113+
114+ property removal_reason : Nil
115+
116+ property report_reasons : Nil
117+
118+ property saved : Bool
119+
120+ property score : Int64
121+
122+ property secure_media : Nil
123+
124+ property secure_media_embed : MediaEmbed
125+
126+ property selftext : String
127+
128+ property selftext_html : String?
129+
130+ property spoiler : Bool
131+
132+ property stickied : Bool
133+
134+ property subreddit : String
135+
136+ property subreddit_id : String
137+
138+ property subreddit_name_prefixed : String
139+
140+ property subreddit_type : String
141+
142+ property suggested_sort : String
143+
144+ property thumbnail : String
145+
146+ property thumbnail_height : Int64?
147+
148+ property thumbnail_width : Int64?
149+
150+ property title : String
151+
152+ property ups : Int64
153+
154+ property url : String
155+
156+ property user_reports : Array(JSON::Any?)
157+
158+ property view_count : Nil
159+
160+ property visited : Bool
161+end
162+
163+class MediaEmbed
164+ include JSON::Serializable
165+
166+end
167+
168+class Preview
169+ include JSON::Serializable
170+
171+ property enabled : Bool
172+
173+ property images : Array(Image)
174+end
175+
176+class Image
177+ include JSON::Serializable
178+
179+ property id : String
180+
181+ property resolutions : Array(Source)
182+
183+ property source : Source
184+
185+ property variants : MediaEmbed
186+end
187+
188+class Source
189+ include JSON::Serializable
190+
191+ property height : Int64
192+
193+ property url : String
194+
195+ property width : Int64
196+end
Test case

test/inputs/json/misc/88130.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/8a62c.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/908db.json

1 generated file · +21 −0
Acrystaldefault / TopLevel.cr+21 −0
@@ -0,0 +1,21 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property states : Array(StateElement)
7+end
8+
9+class StateElement
10+ include JSON::Serializable
11+
12+ property state : StateState
13+end
14+
15+class StateState
16+ include JSON::Serializable
17+
18+ property state_id : String
19+
20+ property state_name : String
21+end
Test case

test/inputs/json/misc/9617f.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/96f7c.json

1 generated file · +17 −0
Acrystaldefault / TopLevel.cr+17 −0
@@ -0,0 +1,17 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property git : Array(String)
7+
8+ property github_services_sha : String
9+
10+ property hooks : Array(String)
11+
12+ property importer : Array(String)
13+
14+ property pages : Array(String)
15+
16+ property verifiable_password_authentication : Bool
17+end
Test case

test/inputs/json/misc/9847b.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property name : String
11+end
Test case

test/inputs/json/misc/9929c.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/996bd.json

1 generated file · +49 −0
Acrystaldefault / TopLevel.cr+49 −0
@@ -0,0 +1,49 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(JSON::Any?)
19+
20+ property superseded_by : String?
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class Text
42+ include JSON::Serializable
43+
44+ property media_type : String
45+
46+ property title : String
47+
48+ property url : String
49+end
Test case

test/inputs/json/misc/9a503.json

1 generated file · +49 −0
Acrystaldefault / TopLevel.cr+49 −0
@@ -0,0 +1,49 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(JSON::Any?)
19+
20+ property superseded_by : Nil
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class Text
42+ include JSON::Serializable
43+
44+ property media_type : String
45+
46+ property title : String
47+
48+ property url : String
49+end
Test case

test/inputs/json/misc/9ac3b.json

1 generated file · +51 −0
Acrystaldefault / TopLevel.cr+51 −0
@@ -0,0 +1,51 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property count : Int64
7+
8+ property facets : Facets
9+
10+ property limit : Int64
11+
12+ property offset : Int64
13+
14+ property previous : Bool
15+
16+ property results : Array(Result)
17+
18+ @[JSON::Field(key: "next")]
19+ property top_level_next : String
20+end
21+
22+class Facets
23+ include JSON::Serializable
24+
25+end
26+
27+class Result
28+ include JSON::Serializable
29+
30+ property created_at : String
31+
32+ property entity : String
33+
34+ property first_name : String
35+
36+ property id : String
37+
38+ property last_name : String
39+
40+ property name : String
41+
42+ property position : String?
43+
44+ property status : String
45+
46+ property title : String?
47+
48+ property updated_at : String
49+
50+ property uri : String
51+end
Test case

test/inputs/json/misc/9eed5.json

1 generated file · +49 −0
Acrystaldefault / TopLevel.cr+49 −0
@@ -0,0 +1,49 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(JSON::Any?)
19+
20+ property superseded_by : Nil
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class Text
42+ include JSON::Serializable
43+
44+ property media_type : String
45+
46+ property title : String
47+
48+ property url : String
49+end
Test case

test/inputs/json/misc/a0496.json

1 generated file · +47 −0
Acrystaldefault / TopLevel.cr+47 −0
@@ -0,0 +1,47 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property code : String
7+
8+ property column_names : Array(String)
9+
10+ property data : Array(Array(Datum?))
11+
12+ property description : String
13+
14+ property display_url : String
15+
16+ property errors : Errors
17+
18+ property frequency : String
19+
20+ property from_date : String
21+
22+ property id : Int64
23+
24+ property name : String
25+
26+ property premium : Bool
27+
28+ property source_code : String
29+
30+ property source_name : String
31+
32+ property to_date : String
33+
34+ @[JSON::Field(key: "type")]
35+ property top_level_type : String
36+
37+ property updated_at : String
38+
39+ property urlize_name : String
40+end
41+
42+class Errors
43+ include JSON::Serializable
44+
45+end
46+
47+alias Datum = Float64 | String
Test case

test/inputs/json/misc/a1eca.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/a3d8c.json

1 generated file · +240 −0
Acrystaldefault / TopLevel.cr+240 −0
@@ -0,0 +1,240 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Array(Datum?))
7+
8+ property meta : Meta
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property view : View
15+end
16+
17+class View
18+ include JSON::Serializable
19+
20+ @[JSON::Field(key: "averageRating")]
21+ property average_rating : Int64
22+
23+ property category : String
24+
25+ property columns : Array(Column)
26+
27+ @[JSON::Field(key: "createdAt")]
28+ property created_at : Int64
29+
30+ @[JSON::Field(key: "displayType")]
31+ property display_type : String
32+
33+ @[JSON::Field(key: "downloadCount")]
34+ property download_count : Int64
35+
36+ property flags : Array(String)
37+
38+ property grants : Array(Grant)
39+
40+ @[JSON::Field(key: "hideFromCatalog")]
41+ property hide_from_catalog : Bool
42+
43+ @[JSON::Field(key: "hideFromDataJson")]
44+ property hide_from_data_json : Bool
45+
46+ property id : String
47+
48+ @[JSON::Field(key: "indexUpdatedAt")]
49+ property index_updated_at : Int64
50+
51+ property license : License
52+
53+ @[JSON::Field(key: "licenseId")]
54+ property license_id : String
55+
56+ property locale : String
57+
58+ property metadata : Metadata
59+
60+ property name : String
61+
62+ @[JSON::Field(key: "newBackend")]
63+ property new_backend : Bool
64+
65+ @[JSON::Field(key: "numberOfComments")]
66+ property number_of_comments : Int64
67+
68+ property oid : Int64
69+
70+ property owner : Owner
71+
72+ property provenance : String
73+
74+ @[JSON::Field(key: "publicationAppendEnabled")]
75+ property publication_append_enabled : Bool
76+
77+ @[JSON::Field(key: "publicationDate")]
78+ property publication_date : Int64
79+
80+ @[JSON::Field(key: "publicationGroup")]
81+ property publication_group : Int64
82+
83+ @[JSON::Field(key: "publicationStage")]
84+ property publication_stage : String
85+
86+ property query : Query
87+
88+ property rights : Array(String)
89+
90+ @[JSON::Field(key: "rowClass")]
91+ property row_class : String
92+
93+ @[JSON::Field(key: "rowsUpdatedAt")]
94+ property rows_updated_at : Int64
95+
96+ @[JSON::Field(key: "rowsUpdatedBy")]
97+ property rows_updated_by : String
98+
99+ @[JSON::Field(key: "tableAuthor")]
100+ property table_author : Owner
101+
102+ @[JSON::Field(key: "tableId")]
103+ property table_id : Int64
104+
105+ @[JSON::Field(key: "totalTimesRated")]
106+ property total_times_rated : Int64
107+
108+ @[JSON::Field(key: "viewCount")]
109+ property view_count : Int64
110+
111+ @[JSON::Field(key: "viewLastModified")]
112+ property view_last_modified : Int64
113+
114+ @[JSON::Field(key: "viewType")]
115+ property view_type : String
116+end
117+
118+class Column
119+ include JSON::Serializable
120+
121+ @[JSON::Field(key: "cachedContents")]
122+ property cached_contents : CachedContents?
123+
124+ @[JSON::Field(key: "dataTypeName")]
125+ property data_type_name : String
126+
127+ @[JSON::Field(key: "fieldName")]
128+ property field_name : String
129+
130+ property flags : Array(String)?
131+
132+ property format : Query
133+
134+ property id : Int64
135+
136+ property name : String
137+
138+ property position : Int64
139+
140+ @[JSON::Field(key: "renderTypeName")]
141+ property render_type_name : String
142+
143+ @[JSON::Field(key: "tableColumnId")]
144+ property table_column_id : Int64?
145+
146+ property width : Int64?
147+end
148+
149+class CachedContents
150+ include JSON::Serializable
151+
152+ property average : String?
153+
154+ property largest : String
155+
156+ property non_null : Int64
157+
158+ property null : Int64
159+
160+ property smallest : String
161+
162+ property sum : String?
163+
164+ property top : Array(Top)
165+end
166+
167+class Top
168+ include JSON::Serializable
169+
170+ property count : Int64
171+
172+ property item : String
173+end
174+
175+class Query
176+ include JSON::Serializable
177+
178+end
179+
180+class Grant
181+ include JSON::Serializable
182+
183+ property flags : Array(String)
184+
185+ @[JSON::Field(key: "type")]
186+ property grant_type : String
187+
188+ property inherited : Bool
189+end
190+
191+class License
192+ include JSON::Serializable
193+
194+ property name : String
195+end
196+
197+class Metadata
198+ include JSON::Serializable
199+
200+ @[JSON::Field(key: "availableDisplayTypes")]
201+ property available_display_types : Array(String)
202+
203+ @[JSON::Field(key: "rdfClass")]
204+ property rdf_class : String
205+
206+ @[JSON::Field(key: "rdfSubject")]
207+ property rdf_subject : String
208+
209+ @[JSON::Field(key: "renderTypeConfig")]
210+ property render_type_config : RenderTypeConfig
211+
212+ @[JSON::Field(key: "rowIdentifier")]
213+ property row_identifier : String
214+end
215+
216+class RenderTypeConfig
217+ include JSON::Serializable
218+
219+ property visible : Visible
220+end
221+
222+class Visible
223+ include JSON::Serializable
224+
225+ property table : Bool
226+end
227+
228+class Owner
229+ include JSON::Serializable
230+
231+ @[JSON::Field(key: "displayName")]
232+ property display_name : String
233+
234+ property id : String
235+
236+ @[JSON::Field(key: "screenName")]
237+ property screen_name : String
238+end
239+
240+alias Datum = Int64 | String
Test case

test/inputs/json/misc/a45b0.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property age : Int64
9+
10+ property country : String
11+
12+ property females : Int64
13+
14+ property males : Int64
15+
16+ property total : Int64
17+
18+ property year : Int64
19+end
Test case

test/inputs/json/misc/a71df.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/a9691.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/ab0d1.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property age : Int64
9+
10+ property country : String
11+
12+ property females : Int64
13+
14+ property males : Int64
15+
16+ property total : Int64
17+
18+ property year : Int64
19+end
Test case

test/inputs/json/misc/abb4b.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/ac944.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/ad8be.json

1 generated file · +57 −0
Acrystaldefault / TopLevel.cr+57 −0
@@ -0,0 +1,57 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property identifiers : Array(Identifier)
11+
12+ property keywords : Array(String)
13+
14+ property links : Array(LinkElement)
15+
16+ property name : String
17+
18+ property other_names : Array(OtherName)
19+
20+ property superseded_by : String?
21+
22+ property text : Array(Text)
23+end
24+
25+class Identifier
26+ include JSON::Serializable
27+
28+ property identifier : String
29+
30+ property scheme : String
31+end
32+
33+class LinkElement
34+ include JSON::Serializable
35+
36+ property note : String
37+
38+ property url : String
39+end
40+
41+class OtherName
42+ include JSON::Serializable
43+
44+ property name : String
45+
46+ property note : String?
47+end
48+
49+class Text
50+ include JSON::Serializable
51+
52+ property media_type : String
53+
54+ property title : String
55+
56+ property url : String
57+end
Test case

test/inputs/json/misc/ae7f0.json

1 generated file · +158 −0
Acrystaldefault / TopLevel.cr+158 −0
@@ -0,0 +1,158 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : TopLevelData
7+
8+ property kind : String
9+end
10+
11+class TopLevelData
12+ include JSON::Serializable
13+
14+ property after : String
15+
16+ property before : Nil
17+
18+ property children : Array(Child)
19+
20+ property modhash : String
21+end
22+
23+class Child
24+ include JSON::Serializable
25+
26+ property data : ChildData
27+
28+ property kind : String
29+end
30+
31+class ChildData
32+ include JSON::Serializable
33+
34+ property approved_at_utc : Nil
35+
36+ property approved_by : Nil
37+
38+ property archived : Bool
39+
40+ property author : String
41+
42+ property author_flair_css_class : Nil
43+
44+ property author_flair_text : Nil
45+
46+ property banned_at_utc : Nil
47+
48+ property banned_by : Nil
49+
50+ property brand_safe : Bool
51+
52+ property can_gild : Bool
53+
54+ property can_mod_post : Bool
55+
56+ property clicked : Bool
57+
58+ property contest_mode : Bool
59+
60+ property created : Float64
61+
62+ property created_utc : Float64
63+
64+ property distinguished : Nil
65+
66+ property domain : String
67+
68+ property downs : Int64
69+
70+ property edited : Bool
71+
72+ property gilded : Int64
73+
74+ property hidden : Bool
75+
76+ property hide_score : Bool
77+
78+ property id : String
79+
80+ property is_self : Bool
81+
82+ property is_video : Bool
83+
84+ property likes : Nil
85+
86+ property link_flair_css_class : String?
87+
88+ property link_flair_text : String?
89+
90+ property locked : Bool
91+
92+ property media : Nil
93+
94+ property media_embed : MediaEmbed
95+
96+ property mod_reports : Array(JSON::Any?)
97+
98+ property name : String
99+
100+ property num_comments : Int64
101+
102+ property num_reports : Nil
103+
104+ property over_18 : Bool
105+
106+ property permalink : String
107+
108+ property quarantine : Bool
109+
110+ property removal_reason : Nil
111+
112+ property report_reasons : Nil
113+
114+ property saved : Bool
115+
116+ property score : Int64
117+
118+ property secure_media : Nil
119+
120+ property secure_media_embed : MediaEmbed
121+
122+ property selftext : String
123+
124+ property selftext_html : Nil
125+
126+ property spoiler : Bool
127+
128+ property stickied : Bool
129+
130+ property subreddit : String
131+
132+ property subreddit_id : String
133+
134+ property subreddit_name_prefixed : String
135+
136+ property subreddit_type : String
137+
138+ property suggested_sort : Nil
139+
140+ property thumbnail : String
141+
142+ property title : String
143+
144+ property ups : Int64
145+
146+ property url : String
147+
148+ property user_reports : Array(JSON::Any?)
149+
150+ property view_count : Nil
151+
152+ property visited : Bool
153+end
154+
155+class MediaEmbed
156+ include JSON::Serializable
157+
158+end
Test case

test/inputs/json/misc/ae9ca.json

1 generated file · +64 −0
Acrystaldefault / TopLevel.cr+64 −0
@@ -0,0 +1,64 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property features : Array(Feature)
7+
8+ property name : String
9+
10+ @[JSON::Field(key: "type")]
11+ property top_level_type : String
12+end
13+
14+class Feature
15+ include JSON::Serializable
16+
17+ @[JSON::Field(key: "type")]
18+ property feature_type : String
19+
20+ property geometry : Geometry
21+
22+ property properties : Properties
23+end
24+
25+class Geometry
26+ include JSON::Serializable
27+
28+ property coordinates : Array(Float64)
29+
30+ @[JSON::Field(key: "type")]
31+ property geometry_type : String
32+end
33+
34+class Properties
35+ include JSON::Serializable
36+
37+ @[JSON::Field(key: "Area")]
38+ property area : String
39+
40+ @[JSON::Field(key: "Central Asset ID")]
41+ property central_asset_id : String
42+
43+ @[JSON::Field(key: "Feature Location")]
44+ property feature_location : String
45+
46+ property lat : String
47+
48+ property long : String
49+
50+ @[JSON::Field(key: "Maintaining Authority")]
51+ property maintaining_authority : String
52+
53+ @[JSON::Field(key: "Number")]
54+ property number : String
55+
56+ @[JSON::Field(key: "Class")]
57+ property properties_class : String
58+
59+ @[JSON::Field(key: "Site Name")]
60+ property site_name : String
61+
62+ @[JSON::Field(key: "Ward")]
63+ property ward : String
64+end
Test case

test/inputs/json/misc/af2d1.json

1 generated file · +136 −0
Acrystaldefault / TopLevel.cr+136 −0
@@ -0,0 +1,136 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property crs : Crs
7+
8+ property features : Array(Feature)
9+
10+ @[JSON::Field(key: "type")]
11+ property top_level_type : String
12+
13+ @[JSON::Field(key: "totalFeatures")]
14+ property total_features : Int64
15+end
16+
17+class Crs
18+ include JSON::Serializable
19+
20+ @[JSON::Field(key: "type")]
21+ property crs_type : String
22+
23+ property properties : CrsProperties
24+end
25+
26+class CrsProperties
27+ include JSON::Serializable
28+
29+ property name : String
30+end
31+
32+class Feature
33+ include JSON::Serializable
34+
35+ @[JSON::Field(key: "type")]
36+ property feature_type : String
37+
38+ property geometry : Geometry
39+
40+ property geometry_name : String
41+
42+ property id : String
43+
44+ property properties : FeatureProperties
45+end
46+
47+class Geometry
48+ include JSON::Serializable
49+
50+ property coordinates : Array(Array(Array(Array(Float64))))
51+
52+ @[JSON::Field(key: "type")]
53+ property geometry_type : String
54+end
55+
56+class FeatureProperties
57+ include JSON::Serializable
58+
59+ property add_improv : String?
60+
61+ @[JSON::Field(key: "area_")]
62+ property area : Float64
63+
64+ property asset_numb : String
65+
66+ property comments : String?
67+
68+ property condition : Int64
69+
70+ property constructi : String?
71+
72+ property createdate : Nil
73+
74+ property createuser : Nil
75+
76+ property disposal_d : Nil
77+
78+ property documents : String
79+
80+ property drawing_nu : String?
81+
82+ property file_numbe : String?
83+
84+ property folder_num : String?
85+
86+ property funding_ba : String?
87+
88+ property historic_c : Int64
89+
90+ property inspection : String
91+
92+ property inspectors : Nil
93+
94+ property last_updat : Nil
95+
96+ property level_accu : String?
97+
98+ property material : String
99+
100+ property mi_prinx : Int64
101+
102+ property mi_symbolo : String
103+
104+ property number_lan : Int64
105+
106+ property owner : String?
107+
108+ property positional : String?
109+
110+ property project_nu : String?
111+
112+ @[JSON::Field(key: "type")]
113+ property properties_type : String?
114+
115+ property rec_id : Int64
116+
117+ property record_cre : String?
118+
119+ property shape_area : Float64
120+
121+ property shape_leng : Float64
122+
123+ property status : String
124+
125+ property survey_num : Nil
126+
127+ property toe_rl : Float64
128+
129+ property top_rl : Float64
130+
131+ property update_dat : String
132+
133+ property updatedate : Nil
134+
135+ property updateuser : Nil
136+end
Test case

test/inputs/json/misc/b4865.json

1 generated file · +42 −0
Acrystaldefault / TopLevel.cr+42 −0
@@ -0,0 +1,42 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ @[JSON::Field(key: ":@computed_region_cbhk_fwbd")]
9+ property computed_region_cbhk_fwbd : String?
10+
11+ @[JSON::Field(key: ":@computed_region_nnqa_25f4")]
12+ property computed_region_nnqa_25_f4 : String?
13+
14+ property fall : String
15+
16+ property geolocation : Geolocation?
17+
18+ property id : String
19+
20+ property mass : String?
21+
22+ property name : String
23+
24+ property nametype : String
25+
26+ property recclass : String
27+
28+ property reclat : String?
29+
30+ property reclong : String?
31+
32+ property year : String?
33+end
34+
35+class Geolocation
36+ include JSON::Serializable
37+
38+ property coordinates : Array(Float64)
39+
40+ @[JSON::Field(key: "type")]
41+ property geolocation_type : String
42+end
Test case

test/inputs/json/misc/b6f2c.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/b6fe5.json

1 generated file · +14 −0
Acrystaldefault / TopLevel.cr+14 −0
@@ -0,0 +1,14 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property group : String
7+
8+ property movie : String
9+
10+ @[JSON::Field(key: "movie-image")]
11+ property movie_image : String
12+
13+ property theater : String
14+end
Test case

test/inputs/json/misc/b9f64.json

1 generated file · +8 −0
Acrystaldefault / TopLevel.cr+8 −0
@@ -0,0 +1,8 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "user-agent")]
7+ property user_agent : String
8+end
Test case

test/inputs/json/misc/bb1ec.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/be234.json

1 generated file · +257 −0
Acrystaldefault / TopLevel.cr+257 −0
@@ -0,0 +1,257 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : TopLevelData
7+
8+ property kind : String
9+end
10+
11+class TopLevelData
12+ include JSON::Serializable
13+
14+ property after : String
15+
16+ property before : Nil
17+
18+ property children : Array(Child)
19+
20+ property modhash : String
21+end
22+
23+class Child
24+ include JSON::Serializable
25+
26+ property data : ChildData
27+
28+ property kind : String
29+end
30+
31+class ChildData
32+ include JSON::Serializable
33+
34+ property approved_at_utc : Nil
35+
36+ property approved_by : Nil
37+
38+ property archived : Bool
39+
40+ property author : String
41+
42+ property author_flair_css_class : Nil
43+
44+ property author_flair_text : String?
45+
46+ property banned_at_utc : Nil
47+
48+ property banned_by : Nil
49+
50+ property brand_safe : Bool
51+
52+ property can_gild : Bool
53+
54+ property can_mod_post : Bool
55+
56+ property clicked : Bool
57+
58+ property contest_mode : Bool
59+
60+ property created : Float64
61+
62+ property created_utc : Float64
63+
64+ property distinguished : String?
65+
66+ property domain : String
67+
68+ property downs : Int64
69+
70+ property edited : Bool
71+
72+ property gilded : Int64
73+
74+ property hidden : Bool
75+
76+ property hide_score : Bool
77+
78+ property id : String
79+
80+ property is_self : Bool
81+
82+ property is_video : Bool
83+
84+ property likes : Nil
85+
86+ property link_flair_css_class : Nil
87+
88+ property link_flair_text : Nil
89+
90+ property locked : Bool
91+
92+ property media : Media?
93+
94+ property media_embed : MediaEmbed
95+
96+ property mod_reports : Array(JSON::Any?)
97+
98+ property name : String
99+
100+ property num_comments : Int64
101+
102+ property num_reports : Nil
103+
104+ property over_18 : Bool
105+
106+ property permalink : String
107+
108+ property post_hint : String
109+
110+ property preview : Preview
111+
112+ property quarantine : Bool
113+
114+ property removal_reason : Nil
115+
116+ property report_reasons : Nil
117+
118+ property saved : Bool
119+
120+ property score : Int64
121+
122+ property secure_media : Media?
123+
124+ property secure_media_embed : MediaEmbed
125+
126+ property selftext : String
127+
128+ property selftext_html : Nil
129+
130+ property spoiler : Bool
131+
132+ property stickied : Bool
133+
134+ property subreddit : String
135+
136+ property subreddit_id : String
137+
138+ property subreddit_name_prefixed : String
139+
140+ property subreddit_type : String
141+
142+ property suggested_sort : Nil
143+
144+ property thumbnail : String
145+
146+ property thumbnail_height : Int64
147+
148+ property thumbnail_width : Int64
149+
150+ property title : String
151+
152+ property ups : Int64
153+
154+ property url : String
155+
156+ property user_reports : Array(JSON::Any?)
157+
158+ property view_count : Nil
159+
160+ property visited : Bool
161+end
162+
163+class Media
164+ include JSON::Serializable
165+
166+ @[JSON::Field(key: "type")]
167+ property media_type : String
168+
169+ property oembed : Oembed
170+end
171+
172+class Oembed
173+ include JSON::Serializable
174+
175+ property description : String
176+
177+ property height : Int64
178+
179+ property html : String
180+
181+ @[JSON::Field(key: "type")]
182+ property oembed_type : String
183+
184+ property provider_name : String
185+
186+ property provider_url : String
187+
188+ property thumbnail_height : Int64
189+
190+ property thumbnail_url : String
191+
192+ property thumbnail_width : Int64
193+
194+ property title : String
195+
196+ property version : String
197+
198+ property width : Int64
199+end
200+
201+class MediaEmbed
202+ include JSON::Serializable
203+
204+ property content : String?
205+
206+ property height : Int64?
207+
208+ property scrolling : Bool?
209+
210+ property width : Int64?
211+end
212+
213+class Preview
214+ include JSON::Serializable
215+
216+ property enabled : Bool
217+
218+ property images : Array(Image)
219+end
220+
221+class Image
222+ include JSON::Serializable
223+
224+ property id : String
225+
226+ property resolutions : Array(Source)
227+
228+ property source : Source
229+
230+ property variants : Variants
231+end
232+
233+class Source
234+ include JSON::Serializable
235+
236+ property height : Int64
237+
238+ property url : String
239+
240+ property width : Int64
241+end
242+
243+class Variants
244+ include JSON::Serializable
245+
246+ property gif : Gif?
247+
248+ property mp4 : Gif?
249+end
250+
251+class Gif
252+ include JSON::Serializable
253+
254+ property resolutions : Array(Source)
255+
256+ property source : Source
257+end
Test case

test/inputs/json/misc/c0356.json

1 generated file · +27 −0
Acrystaldefault / TopLevel.cr+27 −0
@@ -0,0 +1,27 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Hash(String, Datum)
7+
8+ property description : Description
9+end
10+
11+class Datum
12+ include JSON::Serializable
13+
14+ property anomaly : String
15+
16+ property value : String
17+end
18+
19+class Description
20+ include JSON::Serializable
21+
22+ property base_period : String
23+
24+ property missing : Int64
25+
26+ property title : String
27+end
Test case

test/inputs/json/misc/c0a3a.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/c3303.json

1 generated file · +193 −0
Acrystaldefault / TopLevel.cr+193 −0
@@ -0,0 +1,193 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Datum)
7+
8+ property meta : Meta
9+
10+ property pagination : Pagination
11+end
12+
13+class Datum
14+ include JSON::Serializable
15+
16+ property bitly_gif_url : String
17+
18+ property bitly_url : String
19+
20+ property content_url : String
21+
22+ @[JSON::Field(key: "type")]
23+ property datum_type : String
24+
25+ property embed_url : String
26+
27+ property id : String
28+
29+ property images : Images
30+
31+ property import_datetime : String
32+
33+ property is_indexable : Int64
34+
35+ property rating : String
36+
37+ property slug : String
38+
39+ property source : String
40+
41+ property source_post_url : String
42+
43+ property source_tld : String
44+
45+ property trending_datetime : String
46+
47+ property url : String
48+
49+ property user : User?
50+
51+ property username : String
52+end
53+
54+class Images
55+ include JSON::Serializable
56+
57+ property downsized : Downsized
58+
59+ property downsized_large : Downsized
60+
61+ property downsized_medium : Downsized
62+
63+ property downsized_small : DownsizedSmall
64+
65+ property downsized_still : Downsized
66+
67+ property fixed_height : FixedHeight
68+
69+ property fixed_height_downsampled : FixedHeight
70+
71+ property fixed_height_small : FixedHeight
72+
73+ property fixed_height_small_still : Downsized
74+
75+ property fixed_height_still : Downsized
76+
77+ property fixed_width : FixedHeight
78+
79+ property fixed_width_downsampled : FixedHeight
80+
81+ property fixed_width_small : FixedHeight
82+
83+ property fixed_width_small_still : Downsized
84+
85+ property fixed_width_still : Downsized
86+
87+ property looping : Looping
88+
89+ property original : FixedHeight
90+
91+ property original_mp4 : DownsizedSmall
92+
93+ property original_still : Downsized
94+
95+ property preview : DownsizedSmall
96+
97+ property preview_gif : Downsized
98+
99+ property preview_webp : Downsized
100+
101+ @[JSON::Field(key: "480w_still")]
102+ property the_480_w_still : Downsized?
103+end
104+
105+class Downsized
106+ include JSON::Serializable
107+
108+ property height : String
109+
110+ property size : String?
111+
112+ property url : String
113+
114+ property width : String
115+end
116+
117+class DownsizedSmall
118+ include JSON::Serializable
119+
120+ property height : String
121+
122+ property mp4 : String
123+
124+ property mp4_size : String
125+
126+ property width : String
127+end
128+
129+class FixedHeight
130+ include JSON::Serializable
131+
132+ property frames : String?
133+
134+ property hash : String?
135+
136+ property height : String
137+
138+ property mp4 : String?
139+
140+ property mp4_size : String?
141+
142+ property size : String
143+
144+ property url : String
145+
146+ property webp : String
147+
148+ property webp_size : String
149+
150+ property width : String
151+end
152+
153+class Looping
154+ include JSON::Serializable
155+
156+ property mp4 : String
157+
158+ property mp4_size : String
159+end
160+
161+class User
162+ include JSON::Serializable
163+
164+ property avatar_url : String
165+
166+ property banner_url : String
167+
168+ property display_name : String
169+
170+ property profile_url : String
171+
172+ property username : String
173+end
174+
175+class Meta
176+ include JSON::Serializable
177+
178+ property msg : String
179+
180+ property response_id : String
181+
182+ property status : Int64
183+end
184+
185+class Pagination
186+ include JSON::Serializable
187+
188+ property count : Int64
189+
190+ property offset : Int64
191+
192+ property total_count : Int64
193+end
Test case

test/inputs/json/misc/c6cfd.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property countries : Array(Country)
7+end
8+
9+class Country
10+ include JSON::Serializable
11+
12+ property code : String
13+
14+ property name : String
15+end
Test case

test/inputs/json/misc/c8c7e.json

1 generated file · +39 −0
Acrystaldefault / TopLevel.cr+39 −0
@@ -0,0 +1,39 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelUnion)
4+
5+class PurpleTopLevel
6+ include JSON::Serializable
7+
8+ property country : Country
9+
10+ property date : String
11+
12+ property decimal : String
13+
14+ property indicator : Country
15+
16+ property value : String
17+end
18+
19+class Country
20+ include JSON::Serializable
21+
22+ property id : String
23+
24+ property value : String
25+end
26+
27+class FluffyTopLevel
28+ include JSON::Serializable
29+
30+ property page : Int64
31+
32+ property pages : Int64
33+
34+ property per_page : String
35+
36+ property total : Int64
37+end
38+
39+alias TopLevelUnion = FluffyTopLevel | Array(PurpleTopLevel)
Test case

test/inputs/json/misc/cb0cc.json

1 generated file · +34 −0
Acrystaldefault / TopLevel.cr+34 −0
@@ -0,0 +1,34 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property prizes : Array(Prize)
7+end
8+
9+class Prize
10+ include JSON::Serializable
11+
12+ property category : String
13+
14+ property laureates : Array(Laureate)
15+
16+ @[JSON::Field(key: "overallMotivation")]
17+ property overall_motivation : String?
18+
19+ property year : String
20+end
21+
22+class Laureate
23+ include JSON::Serializable
24+
25+ property firstname : String
26+
27+ property id : String
28+
29+ property motivation : String?
30+
31+ property share : String
32+
33+ property surname : String
34+end
Test case

test/inputs/json/misc/cb81e.json

1 generated file · +21 −0
Acrystaldefault / TopLevel.cr+21 −0
@@ -0,0 +1,21 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Hash(String, String)
7+
8+ property description : Description
9+end
10+
11+class Description
12+ include JSON::Serializable
13+
14+ property base_period : String
15+
16+ property missing : String
17+
18+ property title : String
19+
20+ property units : String
21+end
Test case

test/inputs/json/misc/ccd18.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/cd238.json

1 generated file · +76 −0
Acrystaldefault / TopLevel.cr+76 −0
@@ -0,0 +1,76 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property city : String
7+
8+ property delay : String
9+
10+ @[JSON::Field(key: "IATA")]
11+ property iata : String
12+
13+ @[JSON::Field(key: "ICAO")]
14+ property icao : String
15+
16+ property name : String
17+
18+ property state : String
19+
20+ property status : Status
21+
22+ property weather : Weather
23+end
24+
25+class Status
26+ include JSON::Serializable
27+
28+ @[JSON::Field(key: "avgDelay")]
29+ property avg_delay : String
30+
31+ @[JSON::Field(key: "closureBegin")]
32+ property closure_begin : String
33+
34+ @[JSON::Field(key: "closureEnd")]
35+ property closure_end : String
36+
37+ @[JSON::Field(key: "endTime")]
38+ property end_time : String
39+
40+ @[JSON::Field(key: "maxDelay")]
41+ property max_delay : String
42+
43+ @[JSON::Field(key: "minDelay")]
44+ property min_delay : String
45+
46+ property reason : String
47+
48+ @[JSON::Field(key: "type")]
49+ property status_type : String
50+
51+ property trend : String
52+end
53+
54+class Weather
55+ include JSON::Serializable
56+
57+ property meta : Meta
58+
59+ property temp : String
60+
61+ property visibility : Float64
62+
63+ property weather : String
64+
65+ property wind : String
66+end
67+
68+class Meta
69+ include JSON::Serializable
70+
71+ property credit : String
72+
73+ property updated : String
74+
75+ property url : String
76+end
Test case

test/inputs/json/misc/cd463.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/cda6c.json

1 generated file · +39 −0
Acrystaldefault / TopLevel.cr+39 −0
@@ -0,0 +1,39 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelUnion)
4+
5+class PurpleTopLevel
6+ include JSON::Serializable
7+
8+ property country : Country
9+
10+ property date : String
11+
12+ property decimal : String
13+
14+ property indicator : Country
15+
16+ property value : String
17+end
18+
19+class Country
20+ include JSON::Serializable
21+
22+ property id : String
23+
24+ property value : String
25+end
26+
27+class FluffyTopLevel
28+ include JSON::Serializable
29+
30+ property page : Int64
31+
32+ property pages : Int64
33+
34+ property per_page : String
35+
36+ property total : Int64
37+end
38+
39+alias TopLevelUnion = FluffyTopLevel | Array(PurpleTopLevel)
Test case

test/inputs/json/misc/cf0d8.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/cfbce.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property base : String
7+
8+ property date : String
9+
10+ property rates : Hash(String, Float64)
11+end
Test case

test/inputs/json/misc/d0908.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property total_population : Array(TotalPopulation)
7+end
8+
9+class TotalPopulation
10+ include JSON::Serializable
11+
12+ property date : String
13+
14+ property population : Int64
15+end
Test case

test/inputs/json/misc/d23d5.json

1 generated file · +41 −0
Acrystaldefault / TopLevel.cr+41 −0
@@ -0,0 +1,41 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property count : Int64
7+
8+ property facets : Facets
9+
10+ property limit : Int64
11+
12+ property offset : Int64
13+
14+ property previous : Bool
15+
16+ property results : Array(Result)
17+
18+ @[JSON::Field(key: "next")]
19+ property top_level_next : String
20+end
21+
22+class Facets
23+ include JSON::Serializable
24+
25+end
26+
27+class Result
28+ include JSON::Serializable
29+
30+ property acronym : String?
31+
32+ property created_at : String
33+
34+ property id : String
35+
36+ property name : String
37+
38+ property updated_at : String
39+
40+ property uri : String
41+end
Test case

test/inputs/json/misc/dbfb3.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/dc44f.json

1 generated file · +112 −0
Acrystaldefault / TopLevel.cr+112 −0
@@ -0,0 +1,112 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property booster : Array(String)
7+
8+ property border : String
9+
10+ property cards : Array(Card)
11+
12+ property code : String
13+
14+ @[JSON::Field(key: "gathererCode")]
15+ property gatherer_code : String
16+
17+ @[JSON::Field(key: "magicCardsInfoCode")]
18+ property magic_cards_info_code : String
19+
20+ property mkm_id : Int64
21+
22+ property mkm_name : String
23+
24+ property name : String
25+
26+ @[JSON::Field(key: "releaseDate")]
27+ property release_date : String
28+
29+ @[JSON::Field(key: "type")]
30+ property top_level_type : String
31+end
32+
33+class Card
34+ include JSON::Serializable
35+
36+ property artist : String
37+
38+ @[JSON::Field(key: "type")]
39+ property card_type : String
40+
41+ property cmc : Int64
42+
43+ @[JSON::Field(key: "colorIdentity")]
44+ property color_identity : Array(String)?
45+
46+ property colors : Array(String)?
47+
48+ property flavor : String?
49+
50+ property id : String
51+
52+ @[JSON::Field(key: "imageName")]
53+ property image_name : String
54+
55+ property layout : String
56+
57+ property legalities : Array(LegalityElement)
58+
59+ @[JSON::Field(key: "manaCost")]
60+ property mana_cost : String?
61+
62+ @[JSON::Field(key: "mciNumber")]
63+ property mci_number : String?
64+
65+ property multiverseid : Int64
66+
67+ property name : String
68+
69+ @[JSON::Field(key: "originalText")]
70+ property original_text : String?
71+
72+ @[JSON::Field(key: "originalType")]
73+ property original_type : String
74+
75+ property power : String?
76+
77+ property printings : Array(String)
78+
79+ property rarity : String
80+
81+ property reserved : Bool?
82+
83+ property rulings : Array(Ruling)?
84+
85+ property subtypes : Array(String)?
86+
87+ property supertypes : Array(String)?
88+
89+ property text : String?
90+
91+ property toughness : String?
92+
93+ property types : Array(String)
94+
95+ property variations : Array(Int64)?
96+end
97+
98+class LegalityElement
99+ include JSON::Serializable
100+
101+ property format : String
102+
103+ property legality : String
104+end
105+
106+class Ruling
107+ include JSON::Serializable
108+
109+ property date : String
110+
111+ property text : String
112+end
Test case

test/inputs/json/misc/dd1ce.json

1 generated file · +112 −0
Acrystaldefault / TopLevel.cr+112 −0
@@ -0,0 +1,112 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property booster : Array(String)
7+
8+ property border : String
9+
10+ property cards : Array(Card)
11+
12+ property code : String
13+
14+ @[JSON::Field(key: "gathererCode")]
15+ property gatherer_code : String
16+
17+ @[JSON::Field(key: "magicCardsInfoCode")]
18+ property magic_cards_info_code : String
19+
20+ property mkm_id : Int64
21+
22+ property mkm_name : String
23+
24+ property name : String
25+
26+ @[JSON::Field(key: "releaseDate")]
27+ property release_date : String
28+
29+ @[JSON::Field(key: "type")]
30+ property top_level_type : String
31+end
32+
33+class Card
34+ include JSON::Serializable
35+
36+ property artist : String
37+
38+ @[JSON::Field(key: "type")]
39+ property card_type : String
40+
41+ property cmc : Int64
42+
43+ @[JSON::Field(key: "colorIdentity")]
44+ property color_identity : Array(String)?
45+
46+ property colors : Array(String)?
47+
48+ property flavor : String?
49+
50+ property id : String
51+
52+ @[JSON::Field(key: "imageName")]
53+ property image_name : String
54+
55+ property layout : String
56+
57+ property legalities : Array(LegalityElement)
58+
59+ @[JSON::Field(key: "manaCost")]
60+ property mana_cost : String?
61+
62+ @[JSON::Field(key: "mciNumber")]
63+ property mci_number : String?
64+
65+ property multiverseid : Int64
66+
67+ property name : String
68+
69+ @[JSON::Field(key: "originalText")]
70+ property original_text : String?
71+
72+ @[JSON::Field(key: "originalType")]
73+ property original_type : String
74+
75+ property power : String?
76+
77+ property printings : Array(String)
78+
79+ property rarity : String
80+
81+ property reserved : Bool?
82+
83+ property rulings : Array(Ruling)?
84+
85+ property subtypes : Array(String)?
86+
87+ property supertypes : Array(String)?
88+
89+ property text : String?
90+
91+ property toughness : String?
92+
93+ property types : Array(String)
94+
95+ property variations : Array(Int64)?
96+end
97+
98+class LegalityElement
99+ include JSON::Serializable
100+
101+ property format : String
102+
103+ property legality : String
104+end
105+
106+class Ruling
107+ include JSON::Serializable
108+
109+ property date : String
110+
111+ property text : String
112+end
Test case

test/inputs/json/misc/dec3a.json

1 generated file · +120 −0
Acrystaldefault / TopLevel.cr+120 −0
@@ -0,0 +1,120 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property metadata : Metadata
7+
8+ property results : Array(Result)
9+end
10+
11+class Metadata
12+ include JSON::Serializable
13+
14+ @[JSON::Field(key: "executionTime")]
15+ property execution_time : Float64
16+
17+ @[JSON::Field(key: "responseInfo")]
18+ property response_info : ResponseInfo
19+
20+ property resultset : Resultset
21+end
22+
23+class ResponseInfo
24+ include JSON::Serializable
25+
26+ @[JSON::Field(key: "developerMessage")]
27+ property developer_message : String
28+
29+ property status : Int64
30+end
31+
32+class Resultset
33+ include JSON::Serializable
34+
35+ property count : Int64
36+
37+ property page : Int64
38+
39+ property pagesize : Int64
40+end
41+
42+class Result
43+ include JSON::Serializable
44+
45+ property about_office : String
46+
47+ property application_process : String
48+
49+ property body : String
50+
51+ property changed : String
52+
53+ property created : String
54+
55+ property deadline : Nil
56+
57+ property hiring_office : Nil
58+
59+ property hiring_org : HiringOrg
60+
61+ property job_id : Nil
62+
63+ property language : String
64+
65+ property location : Location
66+
67+ property num_positions : String
68+
69+ property position : String
70+
71+ property practice_area : String
72+
73+ property qualifications : String
74+
75+ property relocation_expenses : Nil
76+
77+ property salary : String
78+
79+ property title : String
80+
81+ property travel : String
82+
83+ property url : String
84+
85+ property uuid : String
86+
87+ property vuuid : String
88+end
89+
90+class HiringOrg
91+ include JSON::Serializable
92+
93+ property name : String
94+
95+ property uuid : String
96+end
97+
98+class Location
99+ include JSON::Serializable
100+
101+ property administrative_area : String
102+
103+ property country : String
104+
105+ property fax_number : String
106+
107+ property locality : String
108+
109+ property mobile_number : String
110+
111+ property phone_number : String
112+
113+ property phone_number_extension : String
114+
115+ property postal_code : String
116+
117+ property sub_premise : Nil
118+
119+ property thoroughfare : String
120+end
Test case

test/inputs/json/misc/df957.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/e0ac7.json

1 generated file · +194 −0
Acrystaldefault / TopLevel.cr+194 −0
@@ -0,0 +1,194 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Datum)
7+
8+ property meta : Meta
9+
10+ property pagination : Pagination
11+end
12+
13+class Datum
14+ include JSON::Serializable
15+
16+ property bitly_gif_url : String
17+
18+ property bitly_url : String
19+
20+ property content_url : String
21+
22+ @[JSON::Field(key: "type")]
23+ property datum_type : String
24+
25+ property embed_url : String
26+
27+ property id : String
28+
29+ property images : Images
30+
31+ property import_datetime : String
32+
33+ property is_indexable : Int64
34+
35+ property rating : String
36+
37+ property slug : String
38+
39+ property source : String
40+
41+ property source_post_url : String
42+
43+ property source_tld : String
44+
45+ property trending_datetime : String
46+
47+ property url : String
48+
49+ property user : User?
50+
51+ property username : String
52+end
53+
54+class Images
55+ include JSON::Serializable
56+
57+ property downsized : Downsized
58+
59+ property downsized_large : Downsized
60+
61+ property downsized_medium : Downsized
62+
63+ property downsized_small : DownsizedSmall
64+
65+ property downsized_still : Downsized
66+
67+ property fixed_height : FixedHeight
68+
69+ property fixed_height_downsampled : FixedHeight
70+
71+ property fixed_height_small : FixedHeight
72+
73+ property fixed_height_small_still : Downsized
74+
75+ property fixed_height_still : Downsized
76+
77+ property fixed_width : FixedHeight
78+
79+ property fixed_width_downsampled : FixedHeight
80+
81+ property fixed_width_small : FixedHeight
82+
83+ property fixed_width_small_still : Downsized
84+
85+ property fixed_width_still : Downsized
86+
87+ property hd : DownsizedSmall?
88+
89+ property looping : Looping
90+
91+ property original : FixedHeight
92+
93+ property original_mp4 : DownsizedSmall
94+
95+ property original_still : Downsized
96+
97+ property preview : DownsizedSmall
98+
99+ property preview_gif : Downsized
100+
101+ property preview_webp : Downsized
102+end
103+
104+class Downsized
105+ include JSON::Serializable
106+
107+ property height : String
108+
109+ property size : String?
110+
111+ property url : String
112+
113+ property width : String
114+end
115+
116+class DownsizedSmall
117+ include JSON::Serializable
118+
119+ property height : String
120+
121+ property mp4 : String
122+
123+ property mp4_size : String
124+
125+ property width : String
126+end
127+
128+class FixedHeight
129+ include JSON::Serializable
130+
131+ property frames : String?
132+
133+ property hash : String?
134+
135+ property height : String
136+
137+ property mp4 : String?
138+
139+ property mp4_size : String?
140+
141+ property size : String
142+
143+ property url : String
144+
145+ property webp : String
146+
147+ property webp_size : String
148+
149+ property width : String
150+end
151+
152+class Looping
153+ include JSON::Serializable
154+
155+ property mp4 : String
156+
157+ property mp4_size : String
158+end
159+
160+class User
161+ include JSON::Serializable
162+
163+ property avatar_url : String
164+
165+ property banner_url : String
166+
167+ property display_name : String
168+
169+ property profile_url : String
170+
171+ property twitter : String
172+
173+ property username : String
174+end
175+
176+class Meta
177+ include JSON::Serializable
178+
179+ property msg : String
180+
181+ property response_id : String
182+
183+ property status : Int64
184+end
185+
186+class Pagination
187+ include JSON::Serializable
188+
189+ property count : Int64
190+
191+ property offset : Int64
192+
193+ property total_count : Int64
194+end
Test case

test/inputs/json/misc/e2915.json

1 generated file · +180 −0
Acrystaldefault / TopLevel.cr+180 −0
@@ -0,0 +1,180 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property query : Query
7+end
8+
9+class Query
10+ include JSON::Serializable
11+
12+ property count : Int64
13+
14+ property created : String
15+
16+ property lang : String
17+
18+ property results : Results
19+end
20+
21+class Results
22+ include JSON::Serializable
23+
24+ property channel : ChannelClass
25+end
26+
27+class ChannelClass
28+ include JSON::Serializable
29+
30+ property astronomy : Astronomy
31+
32+ property atmosphere : Atmosphere
33+
34+ property description : String
35+
36+ property image : Image
37+
38+ property item : Item
39+
40+ property language : String
41+
42+ @[JSON::Field(key: "lastBuildDate")]
43+ property last_build_date : String
44+
45+ property link : String
46+
47+ property location : Location
48+
49+ property title : String
50+
51+ property ttl : String
52+
53+ property units : Units
54+
55+ property wind : Wind
56+end
57+
58+class Astronomy
59+ include JSON::Serializable
60+
61+ property sunrise : String
62+
63+ property sunset : String
64+end
65+
66+class Atmosphere
67+ include JSON::Serializable
68+
69+ property humidity : String
70+
71+ property pressure : String
72+
73+ property rising : String
74+
75+ property visibility : String
76+end
77+
78+class Image
79+ include JSON::Serializable
80+
81+ property height : String
82+
83+ property link : String
84+
85+ property title : String
86+
87+ property url : String
88+
89+ property width : String
90+end
91+
92+class Item
93+ include JSON::Serializable
94+
95+ property condition : Condition
96+
97+ property description : String
98+
99+ property forecast : Array(Forecast)
100+
101+ property guid : Guid
102+
103+ property lat : String
104+
105+ property link : String
106+
107+ property long : String
108+
109+ @[JSON::Field(key: "pubDate")]
110+ property pub_date : String
111+
112+ property title : String
113+end
114+
115+class Condition
116+ include JSON::Serializable
117+
118+ property code : String
119+
120+ property date : String
121+
122+ property temp : String
123+
124+ property text : String
125+end
126+
127+class Forecast
128+ include JSON::Serializable
129+
130+ property code : String
131+
132+ property date : String
133+
134+ property day : String
135+
136+ property high : String
137+
138+ property low : String
139+
140+ property text : String
141+end
142+
143+class Guid
144+ include JSON::Serializable
145+
146+ @[JSON::Field(key: "isPermaLink")]
147+ property is_perma_link : String
148+end
149+
150+class Location
151+ include JSON::Serializable
152+
153+ property city : String
154+
155+ property country : String
156+
157+ property region : String
158+end
159+
160+class Units
161+ include JSON::Serializable
162+
163+ property distance : String
164+
165+ property pressure : String
166+
167+ property speed : String
168+
169+ property temperature : String
170+end
171+
172+class Wind
173+ include JSON::Serializable
174+
175+ property chill : String
176+
177+ property direction : String
178+
179+ property speed : String
180+end
Test case

test/inputs/json/misc/e2a58.json

1 generated file · +12 −0
Acrystaldefault / TopLevel.cr+12 −0
@@ -0,0 +1,12 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property date : String
9+
10+ @[JSON::Field(key: "stop-and-search")]
11+ property stop_and_search : Array(String)
12+end
Test case

test/inputs/json/misc/e324e.json

1 generated file · +130 −0
Acrystaldefault / TopLevel.cr+130 −0
@@ -0,0 +1,130 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "basePath")]
7+ property base_path : String
8+
9+ property definitions : Definitions
10+
11+ property host : String
12+
13+ property info : Info
14+
15+ property paths : Paths
16+
17+ property produces : Array(String)
18+
19+ property schemes : Array(String)
20+
21+ property swagger : String
22+end
23+
24+class Definitions
25+ include JSON::Serializable
26+
27+ @[JSON::Field(key: "Rate")]
28+ property rate : Rate
29+end
30+
31+class Rate
32+ include JSON::Serializable
33+
34+ property properties : Hash(String, Property)
35+end
36+
37+class Property
38+ include JSON::Serializable
39+
40+ property description : String
41+
42+ @[JSON::Field(key: "type")]
43+ property property_type : String
44+end
45+
46+class Info
47+ include JSON::Serializable
48+
49+ property description : String
50+
51+ property title : String
52+
53+ property version : String
54+end
55+
56+class Paths
57+ include JSON::Serializable
58+
59+ @[JSON::Field(key: "/tariff_rates/search")]
60+ property tariff_rates_search : TariffRatesSearch
61+end
62+
63+class TariffRatesSearch
64+ include JSON::Serializable
65+
66+ property get : Get
67+end
68+
69+class Get
70+ include JSON::Serializable
71+
72+ property description : String
73+
74+ property parameters : Array(Parameter)
75+
76+ property responses : Responses
77+
78+ property summary : String
79+
80+ property tags : Array(String)
81+end
82+
83+class Parameter
84+ include JSON::Serializable
85+
86+ property description : String
87+
88+ property format : String
89+
90+ property name : String
91+
92+ @[JSON::Field(key: "in")]
93+ property parameter_in : String
94+
95+ @[JSON::Field(key: "type")]
96+ property parameter_type : String
97+
98+ property required : Bool
99+end
100+
101+class Responses
102+ include JSON::Serializable
103+
104+ @[JSON::Field(key: "200")]
105+ property the_200 : The200
106+end
107+
108+class The200
109+ include JSON::Serializable
110+
111+ property description : String
112+
113+ property schema : Schema
114+end
115+
116+class Schema
117+ include JSON::Serializable
118+
119+ property items : Items
120+
121+ @[JSON::Field(key: "type")]
122+ property schema_type : String
123+end
124+
125+class Items
126+ include JSON::Serializable
127+
128+ @[JSON::Field(key: "$ref")]
129+ property ref : String
130+end
Test case

test/inputs/json/misc/e53b5.json

1 generated file · +39 −0
Acrystaldefault / TopLevel.cr+39 −0
@@ -0,0 +1,39 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelUnion)
4+
5+class PurpleTopLevel
6+ include JSON::Serializable
7+
8+ property country : Country
9+
10+ property date : String
11+
12+ property decimal : String
13+
14+ property indicator : Country
15+
16+ property value : String
17+end
18+
19+class Country
20+ include JSON::Serializable
21+
22+ property id : String
23+
24+ property value : String
25+end
26+
27+class FluffyTopLevel
28+ include JSON::Serializable
29+
30+ property page : Int64
31+
32+ property pages : Int64
33+
34+ property per_page : String
35+
36+ property total : Int64
37+end
38+
39+alias TopLevelUnion = FluffyTopLevel | Array(PurpleTopLevel)
Test case

test/inputs/json/misc/e64a0.json

1 generated file · +34 −0
Acrystaldefault / TopLevel.cr+34 −0
@@ -0,0 +1,34 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property args : Args
7+
8+ property headers : Headers
9+
10+ property origin : String
11+
12+ property url : String
13+end
14+
15+class Args
16+ include JSON::Serializable
17+
18+end
19+
20+class Headers
21+ include JSON::Serializable
22+
23+ @[JSON::Field(key: "Accept-Encoding")]
24+ property accept_encoding : String
25+
26+ @[JSON::Field(key: "Connection")]
27+ property connection : String
28+
29+ @[JSON::Field(key: "Host")]
30+ property host : String
31+
32+ @[JSON::Field(key: "User-Agent")]
33+ property user_agent : String
34+end
Test case

test/inputs/json/misc/e8a0b.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property age : Int64
9+
10+ property country : String
11+
12+ property females : Int64
13+
14+ property males : Int64
15+
16+ property total : Int64
17+
18+ property year : Int64
19+end
Test case

test/inputs/json/misc/e8b04.json

1 generated file · +404 −0
Acrystaldefault / TopLevel.cr+404 −0
@@ -0,0 +1,404 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ @[JSON::Field(key: "averageRating")]
9+ property average_rating : Int64
10+
11+ property category : String?
12+
13+ @[JSON::Field(key: "createdAt")]
14+ property created_at : Int64
15+
16+ property description : String?
17+
18+ @[JSON::Field(key: "displayType")]
19+ property display_type : String?
20+
21+ @[JSON::Field(key: "downloadCount")]
22+ property download_count : Int64
23+
24+ property flags : Array(String)?
25+
26+ property grants : Array(Grant)
27+
28+ @[JSON::Field(key: "hideFromCatalog")]
29+ property hide_from_catalog : Bool
30+
31+ @[JSON::Field(key: "hideFromDataJson")]
32+ property hide_from_data_json : Bool
33+
34+ property id : String
35+
36+ @[JSON::Field(key: "indexUpdatedAt")]
37+ property index_updated_at : Int64?
38+
39+ property locale : String
40+
41+ property metadata : TopLevelMetadata
42+
43+ @[JSON::Field(key: "moderationStatus")]
44+ property moderation_status : Bool?
45+
46+ @[JSON::Field(key: "modifyingViewUid")]
47+ property modifying_view_uid : String?
48+
49+ property name : String
50+
51+ @[JSON::Field(key: "newBackend")]
52+ property new_backend : Bool
53+
54+ @[JSON::Field(key: "numberOfComments")]
55+ property number_of_comments : Int64
56+
57+ property oid : Int64
58+
59+ property owner : Owner
60+
61+ property provenance : String
62+
63+ @[JSON::Field(key: "publicationAppendEnabled")]
64+ property publication_append_enabled : Bool
65+
66+ @[JSON::Field(key: "publicationDate")]
67+ property publication_date : Int64?
68+
69+ @[JSON::Field(key: "publicationGroup")]
70+ property publication_group : Int64
71+
72+ @[JSON::Field(key: "publicationStage")]
73+ property publication_stage : String
74+
75+ property ratings : Ratings?
76+
77+ @[JSON::Field(key: "resourceName")]
78+ property resource_name : String?
79+
80+ property rights : Array(String)
81+
82+ @[JSON::Field(key: "rowClass")]
83+ property row_class : String?
84+
85+ @[JSON::Field(key: "rowIdentifierColumnId")]
86+ property row_identifier_column_id : Int64?
87+
88+ @[JSON::Field(key: "rowsUpdatedAt")]
89+ property rows_updated_at : Int64?
90+
91+ @[JSON::Field(key: "rowsUpdatedBy")]
92+ property rows_updated_by : String?
93+
94+ @[JSON::Field(key: "tableAuthor")]
95+ property table_author : TableAuthor
96+
97+ @[JSON::Field(key: "tableId")]
98+ property table_id : Int64
99+
100+ property tags : Array(String)?
101+
102+ @[JSON::Field(key: "totalTimesRated")]
103+ property total_times_rated : Int64
104+
105+ @[JSON::Field(key: "viewCount")]
106+ property view_count : Int64
107+
108+ @[JSON::Field(key: "viewLastModified")]
109+ property view_last_modified : Int64
110+
111+ @[JSON::Field(key: "viewType")]
112+ property view_type : String
113+end
114+
115+class Grant
116+ include JSON::Serializable
117+
118+ property flags : Array(String)
119+
120+ @[JSON::Field(key: "type")]
121+ property grant_type : String
122+
123+ property inherited : Bool
124+end
125+
126+class TopLevelMetadata
127+ include JSON::Serializable
128+
129+ @[JSON::Field(key: "availableDisplayTypes")]
130+ property available_display_types : Array(String)?
131+
132+ property custom_fields : CustomFields?
133+
134+ @[JSON::Field(key: "jsonQuery")]
135+ property json_query : JsonQuery?
136+
137+ @[JSON::Field(key: "rdfClass")]
138+ property rdf_class : String?
139+
140+ @[JSON::Field(key: "rdfSubject")]
141+ property rdf_subject : String?
142+
143+ @[JSON::Field(key: "renderTypeConfig")]
144+ property render_type_config : MetadataRenderTypeConfig?
145+
146+ @[JSON::Field(key: "richRendererConfigs")]
147+ property rich_renderer_configs : RichRendererConfigs?
148+
149+ @[JSON::Field(key: "rowIdentifier")]
150+ property row_identifier : String?
151+
152+ @[JSON::Field(key: "rowLabel")]
153+ property row_label : String?
154+
155+ property v1_archived_properties : V1ArchivedProperties?
156+end
157+
158+class CustomFields
159+ include JSON::Serializable
160+
161+ @[JSON::Field(key: "TEST")]
162+ property test : Test
163+end
164+
165+class Test
166+ include JSON::Serializable
167+
168+ @[JSON::Field(key: "CFPB1")]
169+ property cfpb1 : String
170+end
171+
172+class JsonQuery
173+ include JSON::Serializable
174+
175+ property group : Array(Group)?
176+
177+ @[JSON::Field(key: "select")]
178+ property json_query_select : Array(Select)?
179+
180+ property order : Array(Order)?
181+
182+ property where : Where?
183+end
184+
185+class Group
186+ include JSON::Serializable
187+
188+ @[JSON::Field(key: "columnFieldName")]
189+ property column_field_name : String
190+end
191+
192+class Select
193+ include JSON::Serializable
194+
195+ property aggregate : String?
196+
197+ @[JSON::Field(key: "columnFieldName")]
198+ property column_field_name : String
199+end
200+
201+class Order
202+ include JSON::Serializable
203+
204+ property ascending : Bool
205+
206+ @[JSON::Field(key: "columnFieldName")]
207+ property column_field_name : String
208+end
209+
210+class Where
211+ include JSON::Serializable
212+
213+ property children : Array(Child)?
214+
215+ @[JSON::Field(key: "columnFieldName")]
216+ property column_field_name : String?
217+
218+ property metadata : ChildMetadata?
219+
220+ property operator : String
221+
222+ property value : String?
223+end
224+
225+class Child
226+ include JSON::Serializable
227+
228+ @[JSON::Field(key: "columnFieldName")]
229+ property column_field_name : String
230+
231+ property metadata : ChildMetadata?
232+
233+ property operator : String
234+
235+ property value : String?
236+end
237+
238+class ChildMetadata
239+ include JSON::Serializable
240+
241+ @[JSON::Field(key: "customValues")]
242+ property custom_values : Array(String)?
243+
244+ property freeform : Bool?
245+
246+ @[JSON::Field(key: "includeAuto")]
247+ property include_auto : Int64?
248+
249+ property operator : String?
250+
251+ @[JSON::Field(key: "tableColumnId")]
252+ property table_column_id : TableColumnId?
253+
254+ @[JSON::Field(key: "unifiedVersion")]
255+ property unified_version : Int64?
256+end
257+
258+class TableColumnId
259+ include JSON::Serializable
260+
261+ @[JSON::Field(key: "2819740")]
262+ property the_2819740 : Int64
263+end
264+
265+class MetadataRenderTypeConfig
266+ include JSON::Serializable
267+
268+ property visible : PurpleVisible
269+end
270+
271+class PurpleVisible
272+ include JSON::Serializable
273+
274+ property fatrow : Bool?
275+
276+ property table : Bool?
277+end
278+
279+class RichRendererConfigs
280+ include JSON::Serializable
281+
282+ @[JSON::Field(key: "fatRow")]
283+ property fat_row : FatRow
284+end
285+
286+class FatRow
287+ include JSON::Serializable
288+
289+ property columns : Array(Column)
290+end
291+
292+class Column
293+ include JSON::Serializable
294+
295+ property rows : Array(Row)
296+
297+ property styles : Styles
298+end
299+
300+class Row
301+ include JSON::Serializable
302+
303+ property fields : Array(Field)
304+end
305+
306+class Field
307+ include JSON::Serializable
308+
309+ @[JSON::Field(key: "type")]
310+ property field_type : String
311+
312+ @[JSON::Field(key: "tableColumnId")]
313+ property table_column_id : Int64
314+end
315+
316+class Styles
317+ include JSON::Serializable
318+
319+ property width : String
320+end
321+
322+class V1ArchivedProperties
323+ include JSON::Serializable
324+
325+ @[JSON::Field(key: "accessPoints")]
326+ property access_points : AccessPoints
327+
328+ property blist_id : String
329+
330+ @[JSON::Field(key: "renderTypeConfig")]
331+ property render_type_config : V1ArchivedPropertiesRenderTypeConfig
332+end
333+
334+class AccessPoints
335+ include JSON::Serializable
336+
337+ property new_view : String
338+end
339+
340+class V1ArchivedPropertiesRenderTypeConfig
341+ include JSON::Serializable
342+
343+ property visible : FluffyVisible
344+end
345+
346+class FluffyVisible
347+ include JSON::Serializable
348+
349+ property href : Bool
350+end
351+
352+class Owner
353+ include JSON::Serializable
354+
355+ @[JSON::Field(key: "displayName")]
356+ property display_name : String
357+
358+ property flags : Array(String)?
359+
360+ property id : String
361+
362+ @[JSON::Field(key: "lastNotificationSeenAt")]
363+ property last_notification_seen_at : Int64?
364+
365+ @[JSON::Field(key: "profileImageUrlLarge")]
366+ property profile_image_url_large : String?
367+
368+ @[JSON::Field(key: "profileImageUrlMedium")]
369+ property profile_image_url_medium : String?
370+
371+ @[JSON::Field(key: "profileImageUrlSmall")]
372+ property profile_image_url_small : String?
373+
374+ property rights : Array(String)?
375+
376+ @[JSON::Field(key: "roleName")]
377+ property role_name : String?
378+
379+ @[JSON::Field(key: "screenName")]
380+ property screen_name : String
381+end
382+
383+class Ratings
384+ include JSON::Serializable
385+
386+ property rating : Int64
387+end
388+
389+class TableAuthor
390+ include JSON::Serializable
391+
392+ @[JSON::Field(key: "displayName")]
393+ property display_name : String
394+
395+ property id : String
396+
397+ property rights : Array(String)?
398+
399+ @[JSON::Field(key: "roleName")]
400+ property role_name : String?
401+
402+ @[JSON::Field(key: "screenName")]
403+ property screen_name : String
404+end
Test case

test/inputs/json/misc/ed095.json

1 generated file · +3 −0
Acrystaldefault / TopLevel.cr+3 −0
@@ -0,0 +1,3 @@
1+require "json"
2+
3+alias TopLevel = Hash(String, String)
Test case

test/inputs/json/misc/f22f5.json

1 generated file · +158 −0
Acrystaldefault / TopLevel.cr+158 −0
@@ -0,0 +1,158 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : TopLevelData
7+
8+ property kind : String
9+end
10+
11+class TopLevelData
12+ include JSON::Serializable
13+
14+ property after : String
15+
16+ property before : Nil
17+
18+ property children : Array(Child)
19+
20+ property modhash : String
21+end
22+
23+class Child
24+ include JSON::Serializable
25+
26+ property data : ChildData
27+
28+ property kind : String
29+end
30+
31+class ChildData
32+ include JSON::Serializable
33+
34+ property approved_at_utc : Nil
35+
36+ property approved_by : Nil
37+
38+ property archived : Bool
39+
40+ property author : String
41+
42+ property author_flair_css_class : Nil
43+
44+ property author_flair_text : Nil
45+
46+ property banned_at_utc : Nil
47+
48+ property banned_by : Nil
49+
50+ property brand_safe : Bool
51+
52+ property can_gild : Bool
53+
54+ property can_mod_post : Bool
55+
56+ property clicked : Bool
57+
58+ property contest_mode : Bool
59+
60+ property created : Float64
61+
62+ property created_utc : Float64
63+
64+ property distinguished : Nil
65+
66+ property domain : String
67+
68+ property downs : Int64
69+
70+ property edited : Bool
71+
72+ property gilded : Int64
73+
74+ property hidden : Bool
75+
76+ property hide_score : Bool
77+
78+ property id : String
79+
80+ property is_self : Bool
81+
82+ property is_video : Bool
83+
84+ property likes : Nil
85+
86+ property link_flair_css_class : String?
87+
88+ property link_flair_text : String?
89+
90+ property locked : Bool
91+
92+ property media : Nil
93+
94+ property media_embed : MediaEmbed
95+
96+ property mod_reports : Array(JSON::Any?)
97+
98+ property name : String
99+
100+ property num_comments : Int64
101+
102+ property num_reports : Nil
103+
104+ property over_18 : Bool
105+
106+ property permalink : String
107+
108+ property quarantine : Bool
109+
110+ property removal_reason : Nil
111+
112+ property report_reasons : Nil
113+
114+ property saved : Bool
115+
116+ property score : Int64
117+
118+ property secure_media : Nil
119+
120+ property secure_media_embed : MediaEmbed
121+
122+ property selftext : String
123+
124+ property selftext_html : Nil
125+
126+ property spoiler : Bool
127+
128+ property stickied : Bool
129+
130+ property subreddit : String
131+
132+ property subreddit_id : String
133+
134+ property subreddit_name_prefixed : String
135+
136+ property subreddit_type : String
137+
138+ property suggested_sort : Nil
139+
140+ property thumbnail : String
141+
142+ property title : String
143+
144+ property ups : Int64
145+
146+ property url : String
147+
148+ property user_reports : Array(JSON::Any?)
149+
150+ property view_count : Nil
151+
152+ property visited : Bool
153+end
154+
155+class MediaEmbed
156+ include JSON::Serializable
157+
158+end
Test case

test/inputs/json/misc/f3139.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property id : String
9+
10+ property name : String
11+end
Test case

test/inputs/json/misc/f3edf.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property age : Int64
9+
10+ property country : String
11+
12+ property females : Int64
13+
14+ property males : Int64
15+
16+ property total : Int64
17+
18+ property year : Int64
19+end
Test case

test/inputs/json/misc/f466a.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property age : Int64
9+
10+ property country : String
11+
12+ property females : Int64
13+
14+ property males : Int64
15+
16+ property total : Int64
17+
18+ property year : Int64
19+end
Test case

test/inputs/json/misc/f6a65.json

1 generated file · +195 −0
Acrystaldefault / TopLevel.cr+195 −0
@@ -0,0 +1,195 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Datum)
7+
8+ property meta : Meta
9+
10+ property pagination : Pagination
11+end
12+
13+class Datum
14+ include JSON::Serializable
15+
16+ property bitly_gif_url : String
17+
18+ property bitly_url : String
19+
20+ property content_url : String
21+
22+ @[JSON::Field(key: "type")]
23+ property datum_type : String
24+
25+ property embed_url : String
26+
27+ property id : String
28+
29+ property images : Images
30+
31+ property import_datetime : String
32+
33+ property is_indexable : Int64
34+
35+ property rating : String
36+
37+ property slug : String
38+
39+ property source : String
40+
41+ property source_post_url : String
42+
43+ property source_tld : String
44+
45+ property trending_datetime : String
46+
47+ property url : String
48+
49+ property user : User?
50+
51+ property username : String
52+end
53+
54+class Images
55+ include JSON::Serializable
56+
57+ property downsized : Downsized
58+
59+ property downsized_large : Downsized
60+
61+ property downsized_medium : Downsized
62+
63+ property downsized_small : DownsizedSmall
64+
65+ property downsized_still : Downsized
66+
67+ property fixed_height : FixedHeight
68+
69+ property fixed_height_downsampled : FixedHeight
70+
71+ property fixed_height_small : FixedHeight
72+
73+ property fixed_height_small_still : Downsized
74+
75+ property fixed_height_still : Downsized
76+
77+ property fixed_width : FixedHeight
78+
79+ property fixed_width_downsampled : FixedHeight
80+
81+ property fixed_width_small : FixedHeight
82+
83+ property fixed_width_small_still : Downsized
84+
85+ property fixed_width_still : Downsized
86+
87+ property looping : Looping
88+
89+ property original : FixedHeight
90+
91+ property original_mp4 : DownsizedSmall
92+
93+ property original_still : Downsized
94+
95+ property preview : DownsizedSmall
96+
97+ property preview_gif : Downsized
98+
99+ property preview_webp : Downsized
100+
101+ @[JSON::Field(key: "480w_still")]
102+ property the_480_w_still : Downsized?
103+end
104+
105+class Downsized
106+ include JSON::Serializable
107+
108+ property height : String
109+
110+ property size : String?
111+
112+ property url : String
113+
114+ property width : String
115+end
116+
117+class DownsizedSmall
118+ include JSON::Serializable
119+
120+ property height : String
121+
122+ property mp4 : String
123+
124+ property mp4_size : String
125+
126+ property width : String
127+end
128+
129+class FixedHeight
130+ include JSON::Serializable
131+
132+ property frames : String?
133+
134+ property hash : String?
135+
136+ property height : String
137+
138+ property mp4 : String?
139+
140+ property mp4_size : String?
141+
142+ property size : String
143+
144+ property url : String
145+
146+ property webp : String
147+
148+ property webp_size : String
149+
150+ property width : String
151+end
152+
153+class Looping
154+ include JSON::Serializable
155+
156+ property mp4 : String
157+
158+ property mp4_size : String
159+end
160+
161+class User
162+ include JSON::Serializable
163+
164+ property avatar_url : String
165+
166+ property banner_url : String
167+
168+ property display_name : String
169+
170+ property profile_url : String
171+
172+ property twitter : String
173+
174+ property username : String
175+end
176+
177+class Meta
178+ include JSON::Serializable
179+
180+ property msg : String
181+
182+ property response_id : String
183+
184+ property status : Int64
185+end
186+
187+class Pagination
188+ include JSON::Serializable
189+
190+ property count : Int64
191+
192+ property offset : Int64
193+
194+ property total_count : Int64
195+end
Test case

test/inputs/json/misc/f74d5.json

1 generated file · +240 −0
Acrystaldefault / TopLevel.cr+240 −0
@@ -0,0 +1,240 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Array(Datum))
7+
8+ property meta : Meta
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property view : View
15+end
16+
17+class View
18+ include JSON::Serializable
19+
20+ @[JSON::Field(key: "averageRating")]
21+ property average_rating : Int64
22+
23+ property category : String
24+
25+ property columns : Array(Column)
26+
27+ @[JSON::Field(key: "createdAt")]
28+ property created_at : Int64
29+
30+ @[JSON::Field(key: "displayType")]
31+ property display_type : String
32+
33+ @[JSON::Field(key: "downloadCount")]
34+ property download_count : Int64
35+
36+ property flags : Array(String)
37+
38+ property grants : Array(Grant)
39+
40+ @[JSON::Field(key: "hideFromCatalog")]
41+ property hide_from_catalog : Bool
42+
43+ @[JSON::Field(key: "hideFromDataJson")]
44+ property hide_from_data_json : Bool
45+
46+ property id : String
47+
48+ @[JSON::Field(key: "indexUpdatedAt")]
49+ property index_updated_at : Int64
50+
51+ property license : License
52+
53+ @[JSON::Field(key: "licenseId")]
54+ property license_id : String
55+
56+ property locale : String
57+
58+ property metadata : Metadata
59+
60+ property name : String
61+
62+ @[JSON::Field(key: "newBackend")]
63+ property new_backend : Bool
64+
65+ @[JSON::Field(key: "numberOfComments")]
66+ property number_of_comments : Int64
67+
68+ property oid : Int64
69+
70+ property owner : Owner
71+
72+ property provenance : String
73+
74+ @[JSON::Field(key: "publicationAppendEnabled")]
75+ property publication_append_enabled : Bool
76+
77+ @[JSON::Field(key: "publicationDate")]
78+ property publication_date : Int64
79+
80+ @[JSON::Field(key: "publicationGroup")]
81+ property publication_group : Int64
82+
83+ @[JSON::Field(key: "publicationStage")]
84+ property publication_stage : String
85+
86+ property query : Query
87+
88+ property rights : Array(String)
89+
90+ @[JSON::Field(key: "rowClass")]
91+ property row_class : String
92+
93+ @[JSON::Field(key: "rowsUpdatedAt")]
94+ property rows_updated_at : Int64
95+
96+ @[JSON::Field(key: "rowsUpdatedBy")]
97+ property rows_updated_by : String
98+
99+ @[JSON::Field(key: "tableAuthor")]
100+ property table_author : Owner
101+
102+ @[JSON::Field(key: "tableId")]
103+ property table_id : Int64
104+
105+ @[JSON::Field(key: "totalTimesRated")]
106+ property total_times_rated : Int64
107+
108+ @[JSON::Field(key: "viewCount")]
109+ property view_count : Int64
110+
111+ @[JSON::Field(key: "viewLastModified")]
112+ property view_last_modified : Int64
113+
114+ @[JSON::Field(key: "viewType")]
115+ property view_type : String
116+end
117+
118+class Column
119+ include JSON::Serializable
120+
121+ @[JSON::Field(key: "cachedContents")]
122+ property cached_contents : CachedContents?
123+
124+ @[JSON::Field(key: "dataTypeName")]
125+ property data_type_name : String
126+
127+ @[JSON::Field(key: "fieldName")]
128+ property field_name : String
129+
130+ property flags : Array(String)?
131+
132+ property format : Query
133+
134+ property id : Int64
135+
136+ property name : String
137+
138+ property position : Int64
139+
140+ @[JSON::Field(key: "renderTypeName")]
141+ property render_type_name : String
142+
143+ @[JSON::Field(key: "tableColumnId")]
144+ property table_column_id : Int64?
145+
146+ property width : Int64?
147+end
148+
149+class CachedContents
150+ include JSON::Serializable
151+
152+ property average : String?
153+
154+ property largest : String
155+
156+ property non_null : Int64
157+
158+ property null : Int64
159+
160+ property smallest : String
161+
162+ property sum : String?
163+
164+ property top : Array(Top)
165+end
166+
167+class Top
168+ include JSON::Serializable
169+
170+ property count : Int64
171+
172+ property item : String
173+end
174+
175+class Query
176+ include JSON::Serializable
177+
178+end
179+
180+class Grant
181+ include JSON::Serializable
182+
183+ property flags : Array(String)
184+
185+ @[JSON::Field(key: "type")]
186+ property grant_type : String
187+
188+ property inherited : Bool
189+end
190+
191+class License
192+ include JSON::Serializable
193+
194+ property name : String
195+end
196+
197+class Metadata
198+ include JSON::Serializable
199+
200+ @[JSON::Field(key: "availableDisplayTypes")]
201+ property available_display_types : Array(String)
202+
203+ @[JSON::Field(key: "rdfClass")]
204+ property rdf_class : String
205+
206+ @[JSON::Field(key: "rdfSubject")]
207+ property rdf_subject : String
208+
209+ @[JSON::Field(key: "renderTypeConfig")]
210+ property render_type_config : RenderTypeConfig
211+
212+ @[JSON::Field(key: "rowIdentifier")]
213+ property row_identifier : String
214+end
215+
216+class RenderTypeConfig
217+ include JSON::Serializable
218+
219+ property visible : Visible
220+end
221+
222+class Visible
223+ include JSON::Serializable
224+
225+ property table : Bool
226+end
227+
228+class Owner
229+ include JSON::Serializable
230+
231+ @[JSON::Field(key: "displayName")]
232+ property display_name : String
233+
234+ property id : String
235+
236+ @[JSON::Field(key: "screenName")]
237+ property screen_name : String
238+end
239+
240+alias Datum = Int64 | String
Test case

test/inputs/json/misc/f82d9.json

1 generated file · +154 −0
Acrystaldefault / TopLevel.cr+154 −0
@@ -0,0 +1,154 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "basePath")]
7+ property base_path : String
8+
9+ property definitions : Definitions
10+
11+ property host : String
12+
13+ property info : Info
14+
15+ property paths : Paths
16+
17+ property produces : Array(String)
18+
19+ property schemes : Array(String)
20+
21+ property swagger : String
22+end
23+
24+class Definitions
25+ include JSON::Serializable
26+
27+ @[JSON::Field(key: "Report")]
28+ property report : Report
29+end
30+
31+class Report
32+ include JSON::Serializable
33+
34+ property properties : Properties
35+end
36+
37+class Properties
38+ include JSON::Serializable
39+
40+ property click_url : ClickUrl
41+
42+ property country : ClickUrl
43+
44+ property description : ClickUrl
45+
46+ property expiration_date : ClickUrl
47+
48+ property id : ClickUrl
49+
50+ property industry : ClickUrl
51+
52+ property report_type : ClickUrl
53+
54+ property source_industry : ClickUrl
55+
56+ property title : ClickUrl
57+
58+ property url : ClickUrl
59+end
60+
61+class ClickUrl
62+ include JSON::Serializable
63+
64+ @[JSON::Field(key: "type")]
65+ property click_url_type : String
66+
67+ property description : String
68+end
69+
70+class Info
71+ include JSON::Serializable
72+
73+ property description : String
74+
75+ property title : String
76+
77+ property version : String
78+end
79+
80+class Paths
81+ include JSON::Serializable
82+
83+ @[JSON::Field(key: "/market_research_library/search")]
84+ property market_research_library_search : MarketResearchLibrarySearch
85+end
86+
87+class MarketResearchLibrarySearch
88+ include JSON::Serializable
89+
90+ property get : Get
91+end
92+
93+class Get
94+ include JSON::Serializable
95+
96+ property description : String
97+
98+ property parameters : Array(Parameter)
99+
100+ property responses : Responses
101+
102+ property summary : String
103+
104+ property tags : Array(String)
105+end
106+
107+class Parameter
108+ include JSON::Serializable
109+
110+ property description : String
111+
112+ property format : String
113+
114+ property name : String
115+
116+ @[JSON::Field(key: "in")]
117+ property parameter_in : String
118+
119+ @[JSON::Field(key: "type")]
120+ property parameter_type : String
121+
122+ property required : Bool
123+end
124+
125+class Responses
126+ include JSON::Serializable
127+
128+ @[JSON::Field(key: "200")]
129+ property the_200 : The200
130+end
131+
132+class The200
133+ include JSON::Serializable
134+
135+ property description : String
136+
137+ property schema : Schema
138+end
139+
140+class Schema
141+ include JSON::Serializable
142+
143+ property items : Items
144+
145+ @[JSON::Field(key: "type")]
146+ property schema_type : String
147+end
148+
149+class Items
150+ include JSON::Serializable
151+
152+ @[JSON::Field(key: "$ref")]
153+ property ref : String
154+end
Test case

test/inputs/json/misc/f974d.json

1 generated file · +16 −0
Acrystaldefault / TopLevel.cr+16 −0
@@ -0,0 +1,16 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property block_index : Int64
7+
8+ property hash : String
9+
10+ property height : Int64
11+
12+ property time : Int64
13+
14+ @[JSON::Field(key: "txIndexes")]
15+ property tx_indexes : Array(Int64)
16+end
Test case

test/inputs/json/misc/faff5.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property response : Response
7+end
8+
9+class Response
10+ include JSON::Serializable
11+
12+ property player_count : Int64
13+
14+ property result : Int64
15+end
Test case

test/inputs/json/misc/fcca3.json

1 generated file · +436 −0
Acrystaldefault / TopLevel.cr+436 −0
@@ -0,0 +1,436 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Array(Array(Datum?))
7+
8+ property meta : Meta
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property view : View
15+end
16+
17+class View
18+ include JSON::Serializable
19+
20+ property attribution : String
21+
22+ @[JSON::Field(key: "averageRating")]
23+ property average_rating : Int64
24+
25+ property category : String
26+
27+ property columns : Array(Column)
28+
29+ @[JSON::Field(key: "createdAt")]
30+ property created_at : Int64
31+
32+ property description : String
33+
34+ @[JSON::Field(key: "displayType")]
35+ property display_type : String
36+
37+ @[JSON::Field(key: "downloadCount")]
38+ property download_count : Int64
39+
40+ property flags : Array(String)
41+
42+ property grants : Array(Grant)
43+
44+ @[JSON::Field(key: "hideFromCatalog")]
45+ property hide_from_catalog : Bool
46+
47+ @[JSON::Field(key: "hideFromDataJson")]
48+ property hide_from_data_json : Bool
49+
50+ property id : String
51+
52+ @[JSON::Field(key: "indexUpdatedAt")]
53+ property index_updated_at : Int64
54+
55+ property locale : String
56+
57+ property metadata : ViewMetadata
58+
59+ property name : String
60+
61+ @[JSON::Field(key: "newBackend")]
62+ property new_backend : Bool
63+
64+ @[JSON::Field(key: "numberOfComments")]
65+ property number_of_comments : Int64
66+
67+ property oid : Int64
68+
69+ property owner : Owner
70+
71+ property provenance : String
72+
73+ @[JSON::Field(key: "publicationAppendEnabled")]
74+ property publication_append_enabled : Bool
75+
76+ @[JSON::Field(key: "publicationDate")]
77+ property publication_date : Int64
78+
79+ @[JSON::Field(key: "publicationGroup")]
80+ property publication_group : Int64
81+
82+ @[JSON::Field(key: "publicationStage")]
83+ property publication_stage : String
84+
85+ property query : Query
86+
87+ property rights : Array(String)
88+
89+ @[JSON::Field(key: "rowsUpdatedAt")]
90+ property rows_updated_at : Int64
91+
92+ @[JSON::Field(key: "rowsUpdatedBy")]
93+ property rows_updated_by : String
94+
95+ @[JSON::Field(key: "tableAuthor")]
96+ property table_author : Owner
97+
98+ @[JSON::Field(key: "tableId")]
99+ property table_id : Int64
100+
101+ property tags : Array(String)
102+
103+ @[JSON::Field(key: "totalTimesRated")]
104+ property total_times_rated : Int64
105+
106+ @[JSON::Field(key: "viewCount")]
107+ property view_count : Int64
108+
109+ @[JSON::Field(key: "viewLastModified")]
110+ property view_last_modified : Int64
111+
112+ @[JSON::Field(key: "viewType")]
113+ property view_type : String
114+end
115+
116+class Column
117+ include JSON::Serializable
118+
119+ @[JSON::Field(key: "cachedContents")]
120+ property cached_contents : CachedContents?
121+
122+ @[JSON::Field(key: "dataTypeName")]
123+ property data_type_name : String
124+
125+ property description : String?
126+
127+ @[JSON::Field(key: "fieldName")]
128+ property field_name : String
129+
130+ property flags : Array(String)?
131+
132+ property format : Format
133+
134+ property id : Int64
135+
136+ property name : String
137+
138+ property position : Int64
139+
140+ @[JSON::Field(key: "renderTypeName")]
141+ property render_type_name : String
142+
143+ @[JSON::Field(key: "tableColumnId")]
144+ property table_column_id : Int64?
145+
146+ property width : Int64?
147+end
148+
149+class CachedContents
150+ include JSON::Serializable
151+
152+ property average : String?
153+
154+ property largest : String
155+
156+ property non_null : Int64
157+
158+ property null : Int64
159+
160+ property smallest : String
161+
162+ property sum : String?
163+
164+ property top : Array(Top)
165+end
166+
167+class Top
168+ include JSON::Serializable
169+
170+ property count : Int64
171+
172+ property item : String
173+end
174+
175+class Format
176+ include JSON::Serializable
177+
178+ property align : String?
179+
180+ @[JSON::Field(key: "noCommas")]
181+ property no_commas : String?
182+
183+ @[JSON::Field(key: "precisionStyle")]
184+ property precision_style : String?
185+end
186+
187+class Grant
188+ include JSON::Serializable
189+
190+ property flags : Array(String)
191+
192+ @[JSON::Field(key: "type")]
193+ property grant_type : String
194+
195+ property inherited : Bool
196+end
197+
198+class ViewMetadata
199+ include JSON::Serializable
200+
201+ property attachments : Array(Attachment)
202+
203+ @[JSON::Field(key: "availableDisplayTypes")]
204+ property available_display_types : Array(String)
205+
206+ property custom_fields : CustomFields
207+
208+ @[JSON::Field(key: "filterCondition")]
209+ property filter_condition : FilterCondition
210+
211+ @[JSON::Field(key: "jsonQuery")]
212+ property json_query : JsonQuery
213+
214+ @[JSON::Field(key: "rdfSubject")]
215+ property rdf_subject : String
216+
217+ @[JSON::Field(key: "renderTypeConfig")]
218+ property render_type_config : RenderTypeConfig
219+
220+ @[JSON::Field(key: "rowLabel")]
221+ property row_label : String
222+end
223+
224+class Attachment
225+ include JSON::Serializable
226+
227+ @[JSON::Field(key: "assetId")]
228+ property asset_id : String
229+
230+ @[JSON::Field(key: "blobId")]
231+ property blob_id : String
232+
233+ property filename : String
234+
235+ property name : String
236+end
237+
238+class CustomFields
239+ include JSON::Serializable
240+
241+ @[JSON::Field(key: "Common Core")]
242+ property common_core : CommonCore
243+
244+ @[JSON::Field(key: "Dataset Information")]
245+ property dataset_information : DatasetInformation
246+
247+ @[JSON::Field(key: "Dataset Summary")]
248+ property dataset_summary : DatasetSummary
249+
250+ @[JSON::Field(key: "Disclaimers")]
251+ property disclaimers : Disclaimers
252+end
253+
254+class CommonCore
255+ include JSON::Serializable
256+
257+ @[JSON::Field(key: "Contact Email")]
258+ property contact_email : String
259+
260+ @[JSON::Field(key: "Contact Name")]
261+ property contact_name : String
262+
263+ @[JSON::Field(key: "Publisher")]
264+ property publisher : String
265+end
266+
267+class DatasetInformation
268+ include JSON::Serializable
269+
270+ @[JSON::Field(key: "Agency")]
271+ property agency : String
272+end
273+
274+class DatasetSummary
275+ include JSON::Serializable
276+
277+ @[JSON::Field(key: "Contact Information")]
278+ property contact_information : String
279+
280+ @[JSON::Field(key: "Coverage")]
281+ property coverage : String
282+
283+ @[JSON::Field(key: "Granularity")]
284+ property granularity : String
285+
286+ @[JSON::Field(key: "Organization")]
287+ property organization : String
288+
289+ @[JSON::Field(key: "Posting Frequency")]
290+ property posting_frequency : String
291+
292+ @[JSON::Field(key: "Time Period")]
293+ property time_period : String
294+end
295+
296+class Disclaimers
297+ include JSON::Serializable
298+
299+ @[JSON::Field(key: "Disclaimer")]
300+ property disclaimer : String
301+
302+ @[JSON::Field(key: "Limitations")]
303+ property limitations : String
304+end
305+
306+class FilterCondition
307+ include JSON::Serializable
308+
309+ property children : Array(Child)
310+
311+ @[JSON::Field(key: "type")]
312+ property filter_condition_type : String
313+
314+ property metadata : FilterConditionMetadata
315+
316+ property value : String
317+end
318+
319+class Child
320+ include JSON::Serializable
321+
322+ @[JSON::Field(key: "type")]
323+ property child_type : String
324+
325+ property metadata : ChildMetadata
326+
327+ property value : String
328+end
329+
330+class ChildMetadata
331+ include JSON::Serializable
332+
333+ @[JSON::Field(key: "customValues")]
334+ property custom_values : Array(Array(String))
335+
336+ property operator : String
337+
338+ @[JSON::Field(key: "tableColumnId")]
339+ property table_column_id : TableColumnId
340+end
341+
342+class TableColumnId
343+ include JSON::Serializable
344+
345+ @[JSON::Field(key: "703610")]
346+ property the_703610 : Int64
347+end
348+
349+class FilterConditionMetadata
350+ include JSON::Serializable
351+
352+ property advanced : Bool
353+
354+ @[JSON::Field(key: "unifiedVersion")]
355+ property unified_version : Int64
356+end
357+
358+class JsonQuery
359+ include JSON::Serializable
360+
361+ property order : Array(Order)
362+end
363+
364+class Order
365+ include JSON::Serializable
366+
367+ property ascending : Bool
368+
369+ @[JSON::Field(key: "columnFieldName")]
370+ property column_field_name : String
371+end
372+
373+class RenderTypeConfig
374+ include JSON::Serializable
375+
376+ property visible : Visible
377+end
378+
379+class Visible
380+ include JSON::Serializable
381+
382+ property table : Bool
383+end
384+
385+class Owner
386+ include JSON::Serializable
387+
388+ @[JSON::Field(key: "displayName")]
389+ property display_name : String
390+
391+ property id : String
392+
393+ @[JSON::Field(key: "profileImageUrlLarge")]
394+ property profile_image_url_large : String
395+
396+ @[JSON::Field(key: "profileImageUrlMedium")]
397+ property profile_image_url_medium : String
398+
399+ @[JSON::Field(key: "profileImageUrlSmall")]
400+ property profile_image_url_small : String
401+
402+ property rights : Array(String)
403+
404+ @[JSON::Field(key: "roleName")]
405+ property role_name : String
406+
407+ @[JSON::Field(key: "screenName")]
408+ property screen_name : String
409+end
410+
411+class Query
412+ include JSON::Serializable
413+
414+ @[JSON::Field(key: "orderBys")]
415+ property order_bys : Array(OrderBy)
416+end
417+
418+class OrderBy
419+ include JSON::Serializable
420+
421+ property ascending : Bool
422+
423+ property expression : Expression
424+end
425+
426+class Expression
427+ include JSON::Serializable
428+
429+ @[JSON::Field(key: "columnId")]
430+ property column_id : Int64
431+
432+ @[JSON::Field(key: "type")]
433+ property expression_type : String
434+end
435+
436+alias Datum = Int64 | String
Test case

test/inputs/json/misc/fd329.json

1 generated file · +29 −0
Acrystaldefault / TopLevel.cr+29 −0
@@ -0,0 +1,29 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Hash(String, Datum)
7+
8+ property description : Description
9+end
10+
11+class Datum
12+ include JSON::Serializable
13+
14+ property anomaly : String
15+
16+ property value : String
17+end
18+
19+class Description
20+ include JSON::Serializable
21+
22+ property base_period : String
23+
24+ property missing : Int64
25+
26+ property title : String
27+
28+ property units : String
29+end
Test case

test/inputs/json/priority/bug2037.json

1 generated file · +24 −0
Acrystaldefault / TopLevel.cr+24 −0
@@ -0,0 +1,24 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property mission_specs : Hash(String, MissionSpec)
7+end
8+
9+class MissionSpec
10+ include JSON::Serializable
11+
12+ property objectives : Hash(String, Objective)
13+end
14+
15+class Objective
16+ include JSON::Serializable
17+
18+ property rewards : Hash(String, Reward)
19+end
20+
21+class Reward
22+ include JSON::Serializable
23+
24+end
Test case

test/inputs/json/priority/bug2521.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property options : Array(Option)
7+end
8+
9+class Option
10+ include JSON::Serializable
11+
12+ property foo : String?
13+
14+ property name : String
15+end
Test case

test/inputs/json/priority/bug2590.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property invoices : Array(Invoice)
7+end
8+
9+class Invoice
10+ include JSON::Serializable
11+
12+ @[JSON::Field(key: "createdAt")]
13+ property created_at : String?
14+
15+ @[JSON::Field(key: "dueDate")]
16+ property due_date : String?
17+
18+ property name : String
19+end
Test case

test/inputs/json/priority/bug2663.json

1 generated file · +12 −0
Acrystaldefault / TopLevel.cr+12 −0
@@ -0,0 +1,12 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property birthday : String
7+
8+ @[JSON::Field(key: "lastSeen")]
9+ property last_seen : String
10+
11+ property name : String
12+end
Test case

test/inputs/json/priority/bug2793.json

1 generated file · +26 −0
Acrystaldefault / TopLevel.cr+26 −0
@@ -0,0 +1,26 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "Hints")]
7+ property hints : Hints
8+
9+ @[JSON::Field(key: "Labels")]
10+ property labels : Labels
11+end
12+
13+class Hints
14+ include JSON::Serializable
15+
16+end
17+
18+class Labels
19+ include JSON::Serializable
20+
21+ @[JSON::Field(key: "AccountNumber")]
22+ property account_number : String
23+
24+ @[JSON::Field(key: "Title")]
25+ property title : String
26+end
Test case

test/inputs/json/priority/bug427.json

1 generated file · +1,104 −0
Acrystaldefault / TopLevel.cr+1,104 −0
@@ -0,0 +1,1104 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property children : Array(TopLevelChild)
7+
8+ property flags : GetSignatureFlags
9+
10+ property groups : Array(Group)
11+
12+ property id : Int64
13+
14+ property kind : Int64
15+
16+ property name : String
17+end
18+
19+class TopLevelChild
20+ include JSON::Serializable
21+
22+ property children : Array(PurpleChild)
23+
24+ property comment : IndecentComment?
25+
26+ property flags : PurpleFlags
27+
28+ property groups : Array(Group)
29+
30+ property id : Int64
31+
32+ property kind : Int64
33+
34+ @[JSON::Field(key: "kindString")]
35+ property kind_string : String
36+
37+ property name : String
38+
39+ @[JSON::Field(key: "originalName")]
40+ property original_name : String
41+
42+ property sources : Array(Source)
43+end
44+
45+class PurpleChild
46+ include JSON::Serializable
47+
48+ @[JSON::Field(key: "type")]
49+ property child_type : MagentaType?
50+
51+ property children : Array(FluffyChild)?
52+
53+ property comment : StickyComment?
54+
55+ @[JSON::Field(key: "defaultValue")]
56+ property default_value : String?
57+
58+ @[JSON::Field(key: "extendedBy")]
59+ property extended_by : Array(ExtendedBy)?
60+
61+ @[JSON::Field(key: "extendedTypes")]
62+ property extended_types : Array(ExtendedBy)?
63+
64+ property flags : IndecentFlags
65+
66+ property groups : Array(Group)?
67+
68+ property id : Int64
69+
70+ @[JSON::Field(key: "implementedBy")]
71+ property implemented_by : Array(ExtendedBy)?
72+
73+ @[JSON::Field(key: "implementedTypes")]
74+ property implemented_types : Array(ExtendedBy)?
75+
76+ property kind : Int64
77+
78+ @[JSON::Field(key: "kindString")]
79+ property kind_string : String
80+
81+ property name : String
82+
83+ property signatures : Array(StickySignature)?
84+
85+ property sources : Array(Source)
86+
87+ @[JSON::Field(key: "typeParameter")]
88+ property type_parameter : Array(TypeParameter)?
89+end
90+
91+class MagentaType
92+ include JSON::Serializable
93+
94+ property declaration : StickyDeclaration?
95+
96+ @[JSON::Field(key: "elementType")]
97+ property element_type : ElementType?
98+
99+ property elements : Array(ExtendedBy)?
100+
101+ property id : Int64?
102+
103+ property name : String?
104+
105+ @[JSON::Field(key: "typeArguments")]
106+ property type_arguments : Array(FluffyTypeArgument)?
107+
108+ @[JSON::Field(key: "type")]
109+ property type_type : String
110+
111+ property types : Array(ExtendedBy)?
112+
113+ property value : String?
114+end
115+
116+class StickyDeclaration
117+ include JSON::Serializable
118+
119+ property children : Array(IndecentChild)?
120+
121+ property flags : GetSignatureFlags
122+
123+ property groups : Array(Group)?
124+
125+ property id : Int64
126+
127+ property kind : Int64
128+
129+ @[JSON::Field(key: "kindString")]
130+ property kind_string : String
131+
132+ property name : String
133+
134+ property signatures : Array(GetSignature)
135+
136+ property sources : Array(Source)
137+end
138+
139+class IndecentChild
140+ include JSON::Serializable
141+
142+ @[JSON::Field(key: "type")]
143+ property child_type : FriskyType
144+
145+ property flags : FluffyFlags
146+
147+ property id : Int64
148+
149+ property kind : Int64
150+
151+ @[JSON::Field(key: "kindString")]
152+ property kind_string : String
153+
154+ property name : String
155+
156+ property sources : Array(Source)
157+end
158+
159+class FriskyType
160+ include JSON::Serializable
161+
162+ property declaration : IndigoDeclaration?
163+
164+ property name : String?
165+
166+ @[JSON::Field(key: "type")]
167+ property type_type : String
168+end
169+
170+class IndigoDeclaration
171+ include JSON::Serializable
172+
173+ property children : Array(GetSignature)?
174+
175+ property flags : GetSignatureFlags
176+
177+ property groups : Array(Group)?
178+
179+ property id : Int64
180+
181+ property kind : Int64
182+
183+ @[JSON::Field(key: "kindString")]
184+ property kind_string : String
185+
186+ property name : String
187+
188+ property signatures : Array(GetSignature)?
189+
190+ property sources : Array(Source)
191+end
192+
193+class IndexSignatureElement
194+ include JSON::Serializable
195+
196+ property flags : GetSignatureFlags
197+
198+ property id : Int64
199+
200+ property kind : Int64
201+
202+ @[JSON::Field(key: "kindString")]
203+ property kind_string : String
204+
205+ property name : String
206+
207+ property parameters : Array(GetSignature)?
208+
209+ @[JSON::Field(key: "type")]
210+ property signature_type : PurpleType
211+end
212+
213+class GetSignatureType
214+ include JSON::Serializable
215+
216+ property declaration : GetSignature?
217+
218+ @[JSON::Field(key: "elementType")]
219+ property element_type : ElementType?
220+
221+ property name : String?
222+
223+ @[JSON::Field(key: "type")]
224+ property type_type : String
225+end
226+
227+class PurpleType
228+ include JSON::Serializable
229+
230+ property declaration : GetSignature?
231+
232+ property name : String?
233+
234+ @[JSON::Field(key: "type")]
235+ property type_type : String
236+end
237+
238+class GetSignatureChild
239+ include JSON::Serializable
240+
241+ @[JSON::Field(key: "type")]
242+ property child_type : PurpleType
243+
244+ property comment : FluffyComment?
245+
246+ property flags : FluffyFlags
247+
248+ property id : Int64
249+
250+ property kind : Int64
251+
252+ @[JSON::Field(key: "kindString")]
253+ property kind_string : String
254+
255+ property name : String
256+
257+ property sources : Array(Source)
258+end
259+
260+class GetSignature
261+ include JSON::Serializable
262+
263+ property children : Array(GetSignatureChild)?
264+
265+ property comment : GetSignatureComment?
266+
267+ @[JSON::Field(key: "defaultValue")]
268+ property default_value : String?
269+
270+ property flags : GetSignatureFlags
271+
272+ @[JSON::Field(key: "type")]
273+ property get_signature_type : GetSignatureType?
274+
275+ property groups : Array(Group)?
276+
277+ property id : Int64
278+
279+ property kind : Int64
280+
281+ @[JSON::Field(key: "kindString")]
282+ property kind_string : String
283+
284+ property name : String
285+
286+ property parameters : Array(GetSignatureParameter)?
287+
288+ property signatures : Array(IndexSignatureElement)?
289+
290+ property sources : Array(Source)?
291+
292+ @[JSON::Field(key: "typeParameter")]
293+ property type_parameter : Array(GetSignature)?
294+end
295+
296+class GetSignatureFlags
297+ include JSON::Serializable
298+
299+end
300+
301+class ElementType
302+ include JSON::Serializable
303+
304+ @[JSON::Field(key: "type")]
305+ property element_type_type : String
306+
307+ property name : String
308+end
309+
310+class FluffyComment
311+ include JSON::Serializable
312+
313+ property text : String
314+end
315+
316+class FluffyFlags
317+ include JSON::Serializable
318+
319+ @[JSON::Field(key: "isOptional")]
320+ property is_optional : Bool?
321+end
322+
323+class Source
324+ include JSON::Serializable
325+
326+ property character : Int64
327+
328+ @[JSON::Field(key: "fileName")]
329+ property file_name : String
330+
331+ property line : Int64
332+end
333+
334+class GetSignatureComment
335+ include JSON::Serializable
336+
337+ property returns : String?
338+
339+ @[JSON::Field(key: "shortText")]
340+ property short_text : String?
341+
342+ property text : String?
343+end
344+
345+class Group
346+ include JSON::Serializable
347+
348+ property children : Array(Int64)
349+
350+ property kind : Int64
351+
352+ property title : String
353+end
354+
355+class GetSignatureParameter
356+ include JSON::Serializable
357+
358+ property comment : TentacledComment?
359+
360+ property flags : TentacledFlags
361+
362+ property id : Int64
363+
364+ property kind : Int64
365+
366+ @[JSON::Field(key: "kindString")]
367+ property kind_string : String
368+
369+ property name : String
370+
371+ @[JSON::Field(key: "type")]
372+ property parameter_type : FluffyType
373+end
374+
375+class TentacledComment
376+ include JSON::Serializable
377+
378+ @[JSON::Field(key: "shortText")]
379+ property short_text : String?
380+
381+ property text : String?
382+end
383+
384+class TentacledFlags
385+ include JSON::Serializable
386+
387+ @[JSON::Field(key: "isOptional")]
388+ property is_optional : Bool?
389+
390+ @[JSON::Field(key: "isRest")]
391+ property is_rest : Bool?
392+end
393+
394+class FluffyType
395+ include JSON::Serializable
396+
397+ @[JSON::Field(key: "elementType")]
398+ property element_type : ElementType?
399+
400+ property name : String?
401+
402+ @[JSON::Field(key: "typeArguments")]
403+ property type_arguments : Array(ElementType)?
404+
405+ @[JSON::Field(key: "type")]
406+ property type_type : String
407+end
408+
409+class ExtendedBy
410+ include JSON::Serializable
411+
412+ property constraint : ExtendedBy?
413+
414+ @[JSON::Field(key: "type")]
415+ property extended_by_type : String
416+
417+ property id : Int64?
418+
419+ property name : String
420+
421+ @[JSON::Field(key: "typeArguments")]
422+ property type_arguments : Array(ExtendedBy)?
423+end
424+
425+class FluffyTypeArgument
426+ include JSON::Serializable
427+
428+ @[JSON::Field(key: "type")]
429+ property type_argument_type : String
430+
431+ property types : Array(ElementType)
432+end
433+
434+class FluffyChild
435+ include JSON::Serializable
436+
437+ @[JSON::Field(key: "type")]
438+ property child_type : IndigoType?
439+
440+ property children : Array(TentacledChild)?
441+
442+ property comment : StickyComment?
443+
444+ @[JSON::Field(key: "defaultValue")]
445+ property default_value : String?
446+
447+ property flags : StickyFlags
448+
449+ @[JSON::Field(key: "getSignature")]
450+ property get_signature : GetSignature?
451+
452+ property groups : Array(Group)?
453+
454+ property id : Int64
455+
456+ @[JSON::Field(key: "implementationOf")]
457+ property implementation_of : ExtendedBy?
458+
459+ @[JSON::Field(key: "inheritedFrom")]
460+ property inherited_from : ExtendedBy?
461+
462+ property kind : Int64
463+
464+ @[JSON::Field(key: "kindString")]
465+ property kind_string : String
466+
467+ property name : String
468+
469+ property overwrites : ExtendedBy?
470+
471+ @[JSON::Field(key: "setSignature")]
472+ property set_signature : GetSignature?
473+
474+ property signatures : Array(FluffySignature)?
475+
476+ property sources : Array(Source)
477+end
478+
479+class IndigoType
480+ include JSON::Serializable
481+
482+ property constraint : ExtendedBy?
483+
484+ property declaration : FluffyDeclaration?
485+
486+ @[JSON::Field(key: "elementType")]
487+ property element_type : ExtendedBy?
488+
489+ property elements : Array(ElementType)?
490+
491+ property id : Int64?
492+
493+ property name : String?
494+
495+ @[JSON::Field(key: "typeArguments")]
496+ property type_arguments : Array(PurpleTypeArgument)?
497+
498+ @[JSON::Field(key: "type")]
499+ property type_type : String
500+
501+ property types : Array(TypeElement)?
502+end
503+
504+class FluffyDeclaration
505+ include JSON::Serializable
506+
507+ property children : Array(StickyChild)?
508+
509+ property flags : GetSignatureFlags
510+
511+ property groups : Array(Group)?
512+
513+ property id : Int64
514+
515+ @[JSON::Field(key: "indexSignature")]
516+ property index_signature : IndexSignature?
517+
518+ property kind : Int64
519+
520+ @[JSON::Field(key: "kindString")]
521+ property kind_string : String
522+
523+ property name : String
524+
525+ property signatures : Array(TentacledSignature)?
526+
527+ property sources : Array(Source)
528+end
529+
530+class StickyChild
531+ include JSON::Serializable
532+
533+ @[JSON::Field(key: "type")]
534+ property child_type : IndecentType
535+
536+ property comment : FluffyComment?
537+
538+ property flags : FluffyFlags
539+
540+ property id : Int64
541+
542+ property kind : Int64
543+
544+ @[JSON::Field(key: "kindString")]
545+ property kind_string : String
546+
547+ property name : String
548+
549+ property sources : Array(Source)
550+end
551+
552+class IndecentType
553+ include JSON::Serializable
554+
555+ property declaration : GetSignature?
556+
557+ property elements : Array(ElementType)?
558+
559+ property name : String?
560+
561+ @[JSON::Field(key: "type")]
562+ property type_type : String
563+end
564+
565+class IndexSignature
566+ include JSON::Serializable
567+
568+ property flags : GetSignatureFlags
569+
570+ property id : Int64
571+
572+ @[JSON::Field(key: "type")]
573+ property index_signature_type : HilariousType
574+
575+ property kind : Int64
576+
577+ @[JSON::Field(key: "kindString")]
578+ property kind_string : String
579+
580+ property name : String
581+
582+ property parameters : Array(GetSignature)
583+end
584+
585+class HilariousType
586+ include JSON::Serializable
587+
588+ property declaration : GetSignature
589+
590+ @[JSON::Field(key: "type")]
591+ property type_type : String
592+end
593+
594+class TentacledSignature
595+ include JSON::Serializable
596+
597+ property comment : IndigoComment?
598+
599+ property flags : GetSignatureFlags
600+
601+ property id : Int64
602+
603+ property kind : Int64
604+
605+ @[JSON::Field(key: "kindString")]
606+ property kind_string : String
607+
608+ property name : String
609+
610+ property parameters : Array(FluffyParameter)?
611+
612+ @[JSON::Field(key: "type")]
613+ property signature_type : ExtendedBy
614+end
615+
616+class IndigoComment
617+ include JSON::Serializable
618+
619+ property returns : String
620+
621+ @[JSON::Field(key: "shortText")]
622+ property short_text : String
623+end
624+
625+class FluffyParameter
626+ include JSON::Serializable
627+
628+ property comment : FluffyComment?
629+
630+ property flags : FluffyFlags
631+
632+ property id : Int64
633+
634+ property kind : Int64
635+
636+ @[JSON::Field(key: "kindString")]
637+ property kind_string : String
638+
639+ property name : String
640+
641+ @[JSON::Field(key: "type")]
642+ property parameter_type : ElementType
643+
644+ property sources : Array(Source)?
645+end
646+
647+class PurpleTypeArgument
648+ include JSON::Serializable
649+
650+ property operator : String
651+
652+ property target : ElementType
653+
654+ @[JSON::Field(key: "type")]
655+ property type_argument_type : String
656+end
657+
658+class TypeElement
659+ include JSON::Serializable
660+
661+ property declaration : GetSignature?
662+
663+ @[JSON::Field(key: "elementType")]
664+ property element_type : ElementType?
665+
666+ property name : String?
667+
668+ @[JSON::Field(key: "typeArguments")]
669+ property type_arguments : Array(ElementType)?
670+
671+ @[JSON::Field(key: "type")]
672+ property type_type : String
673+end
674+
675+class TentacledChild
676+ include JSON::Serializable
677+
678+ @[JSON::Field(key: "type")]
679+ property child_type : TypeElement?
680+
681+ property comment : PurpleComment?
682+
683+ @[JSON::Field(key: "defaultValue")]
684+ property default_value : String?
685+
686+ property flags : PurpleFlags
687+
688+ property id : Int64
689+
690+ property kind : Int64
691+
692+ @[JSON::Field(key: "kindString")]
693+ property kind_string : String
694+
695+ property name : String
696+
697+ property signatures : Array(PurpleSignature)?
698+
699+ property sources : Array(Source)
700+end
701+
702+class PurpleComment
703+ include JSON::Serializable
704+
705+ @[JSON::Field(key: "shortText")]
706+ property short_text : String
707+end
708+
709+class PurpleFlags
710+ include JSON::Serializable
711+
712+ @[JSON::Field(key: "isExported")]
713+ property is_exported : Bool?
714+end
715+
716+class PurpleSignature
717+ include JSON::Serializable
718+
719+ property comment : PurpleComment?
720+
721+ property flags : GetSignatureFlags
722+
723+ property id : Int64
724+
725+ property kind : Int64
726+
727+ @[JSON::Field(key: "kindString")]
728+ property kind_string : String
729+
730+ property name : String
731+
732+ property parameters : Array(GetSignature)
733+
734+ @[JSON::Field(key: "type")]
735+ property signature_type : TentacledType
736+end
737+
738+class TentacledType
739+ include JSON::Serializable
740+
741+ property declaration : PurpleDeclaration?
742+
743+ property name : String?
744+
745+ @[JSON::Field(key: "type")]
746+ property type_type : String
747+end
748+
749+class PurpleDeclaration
750+ include JSON::Serializable
751+
752+ property children : Array(GetSignature)
753+
754+ property flags : GetSignatureFlags
755+
756+ property groups : Array(Group)
757+
758+ property id : Int64
759+
760+ property kind : Int64
761+
762+ @[JSON::Field(key: "kindString")]
763+ property kind_string : String
764+
765+ property name : String
766+end
767+
768+class StickyComment
769+ include JSON::Serializable
770+
771+ property returns : String?
772+
773+ @[JSON::Field(key: "shortText")]
774+ property short_text : String?
775+
776+ property tags : Array(Tag)?
777+
778+ property text : String?
779+end
780+
781+class Tag
782+ include JSON::Serializable
783+
784+ property tag : String
785+
786+ property text : String
787+end
788+
789+class StickyFlags
790+ include JSON::Serializable
791+
792+ @[JSON::Field(key: "isAbstract")]
793+ property is_abstract : Bool?
794+
795+ @[JSON::Field(key: "isConstructorProperty")]
796+ property is_constructor_property : Bool?
797+
798+ @[JSON::Field(key: "isExported")]
799+ property is_exported : Bool?
800+
801+ @[JSON::Field(key: "isPrivate")]
802+ property is_private : Bool?
803+
804+ @[JSON::Field(key: "isProtected")]
805+ property is_protected : Bool?
806+
807+ @[JSON::Field(key: "isPublic")]
808+ property is_public : Bool?
809+
810+ @[JSON::Field(key: "isStatic")]
811+ property is_static : Bool?
812+end
813+
814+class FluffySignature
815+ include JSON::Serializable
816+
817+ property comment : StickyComment?
818+
819+ property flags : IndigoFlags
820+
821+ property id : Int64
822+
823+ @[JSON::Field(key: "implementationOf")]
824+ property implementation_of : ExtendedBy?
825+
826+ @[JSON::Field(key: "inheritedFrom")]
827+ property inherited_from : ExtendedBy?
828+
829+ property kind : Int64
830+
831+ @[JSON::Field(key: "kindString")]
832+ property kind_string : String
833+
834+ property name : String
835+
836+ property overwrites : ExtendedBy?
837+
838+ property parameters : Array(PurpleParameter)?
839+
840+ @[JSON::Field(key: "type")]
841+ property signature_type : ExtendedBy
842+
843+ @[JSON::Field(key: "typeParameter")]
844+ property type_parameter : Array(GetSignature)?
845+end
846+
847+class IndigoFlags
848+ include JSON::Serializable
849+
850+ @[JSON::Field(key: "isPrivate")]
851+ property is_private : Bool?
852+
853+ @[JSON::Field(key: "isProtected")]
854+ property is_protected : Bool?
855+end
856+
857+class PurpleParameter
858+ include JSON::Serializable
859+
860+ property comment : TentacledComment?
861+
862+ property flags : GetSignatureFlags
863+
864+ property id : Int64
865+
866+ property kind : Int64
867+
868+ @[JSON::Field(key: "kindString")]
869+ property kind_string : String
870+
871+ property name : String
872+
873+ @[JSON::Field(key: "type")]
874+ property parameter_type : StickyType
875+end
876+
877+class StickyType
878+ include JSON::Serializable
879+
880+ property constraint : ExtendedBy?
881+
882+ property declaration : GetSignature?
883+
884+ @[JSON::Field(key: "elementType")]
885+ property element_type : ElementType?
886+
887+ property elements : Array(ExtendedBy)?
888+
889+ property id : Int64?
890+
891+ property name : String?
892+
893+ @[JSON::Field(key: "typeArguments")]
894+ property type_arguments : Array(ElementType)?
895+
896+ @[JSON::Field(key: "type")]
897+ property type_type : String
898+end
899+
900+class IndecentFlags
901+ include JSON::Serializable
902+
903+ @[JSON::Field(key: "hasExportAssignment")]
904+ property has_export_assignment : Bool?
905+
906+ @[JSON::Field(key: "isAbstract")]
907+ property is_abstract : Bool?
908+
909+ @[JSON::Field(key: "isConst")]
910+ property is_const : Bool?
911+
912+ @[JSON::Field(key: "isExported")]
913+ property is_exported : Bool?
914+
915+ @[JSON::Field(key: "isLet")]
916+ property is_let : Bool?
917+
918+ @[JSON::Field(key: "isPrivate")]
919+ property is_private : Bool?
920+
921+ @[JSON::Field(key: "isProtected")]
922+ property is_protected : Bool?
923+end
924+
925+class StickySignature
926+ include JSON::Serializable
927+
928+ property comment : StickyComment
929+
930+ property flags : IndigoFlags
931+
932+ property id : Int64
933+
934+ property kind : Int64
935+
936+ @[JSON::Field(key: "kindString")]
937+ property kind_string : String
938+
939+ property name : String
940+
941+ property parameters : Array(TentacledParameter)?
942+
943+ @[JSON::Field(key: "type")]
944+ property signature_type : CunningType
945+
946+ @[JSON::Field(key: "typeParameter")]
947+ property type_parameter : Array(GetSignature)?
948+end
949+
950+class TentacledParameter
951+ include JSON::Serializable
952+
953+ property comment : TentacledComment?
954+
955+ @[JSON::Field(key: "defaultValue")]
956+ property default_value : String?
957+
958+ property flags : TentacledFlags
959+
960+ property id : Int64
961+
962+ property kind : Int64
963+
964+ @[JSON::Field(key: "kindString")]
965+ property kind_string : String
966+
967+ property name : String
968+
969+ @[JSON::Field(key: "originalName")]
970+ property original_name : String?
971+
972+ @[JSON::Field(key: "type")]
973+ property parameter_type : AmbitiousType
974+end
975+
976+class AmbitiousType
977+ include JSON::Serializable
978+
979+ property declaration : TentacledDeclaration?
980+
981+ @[JSON::Field(key: "elementType")]
982+ property element_type : ElementType?
983+
984+ property id : Int64?
985+
986+ property name : String?
987+
988+ @[JSON::Field(key: "typeArguments")]
989+ property type_arguments : Array(ElementType)?
990+
991+ @[JSON::Field(key: "type")]
992+ property type_type : String
993+end
994+
995+class TentacledDeclaration
996+ include JSON::Serializable
997+
998+ property children : Array(IndigoChild)?
999+
1000+ property flags : GetSignatureFlags
1001+
1002+ property groups : Array(Group)?
1003+
1004+ property id : Int64
1005+
1006+ @[JSON::Field(key: "indexSignature")]
1007+ property index_signature : IndexSignatureElement?
1008+
1009+ property kind : Int64
1010+
1011+ @[JSON::Field(key: "kindString")]
1012+ property kind_string : String
1013+
1014+ property name : String
1015+
1016+ property signatures : Array(GetSignature)?
1017+
1018+ property sources : Array(Source)
1019+end
1020+
1021+class IndigoChild
1022+ include JSON::Serializable
1023+
1024+ @[JSON::Field(key: "type")]
1025+ property child_type : IndecentType
1026+
1027+ property comment : FluffyComment
1028+
1029+ @[JSON::Field(key: "defaultValue")]
1030+ property default_value : String?
1031+
1032+ property flags : FluffyFlags
1033+
1034+ property id : Int64
1035+
1036+ property kind : Int64
1037+
1038+ @[JSON::Field(key: "kindString")]
1039+ property kind_string : String
1040+
1041+ property name : String
1042+
1043+ property sources : Array(Source)
1044+end
1045+
1046+class CunningType
1047+ include JSON::Serializable
1048+
1049+ property declaration : PurpleDeclaration?
1050+
1051+ property id : Int64?
1052+
1053+ property name : String?
1054+
1055+ @[JSON::Field(key: "typeArguments")]
1056+ property type_arguments : Array(ElementType)?
1057+
1058+ @[JSON::Field(key: "type")]
1059+ property type_type : String
1060+end
1061+
1062+class TypeParameter
1063+ include JSON::Serializable
1064+
1065+ property comment : PurpleComment?
1066+
1067+ property flags : GetSignatureFlags
1068+
1069+ property id : Int64
1070+
1071+ property kind : Int64
1072+
1073+ @[JSON::Field(key: "kindString")]
1074+ property kind_string : String
1075+
1076+ property name : String
1077+
1078+ @[JSON::Field(key: "type")]
1079+ property type_parameter_type : MischievousType?
1080+end
1081+
1082+class MischievousType
1083+ include JSON::Serializable
1084+
1085+ property id : Int64?
1086+
1087+ property name : String?
1088+
1089+ property operator : String?
1090+
1091+ property target : ElementType?
1092+
1093+ @[JSON::Field(key: "type")]
1094+ property type_type : String
1095+end
1096+
1097+class IndecentComment
1098+ include JSON::Serializable
1099+
1100+ @[JSON::Field(key: "shortText")]
1101+ property short_text : String
1102+
1103+ property tags : Array(Tag)?
1104+end
Test case

test/inputs/json/priority/bug790.json

1 generated file · +21 −0
Acrystaldefault / TopLevel.cr+21 −0
@@ -0,0 +1,21 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property children_data : Array(TopLevel)
7+
8+ property id : Int64
9+
10+ property is_active : Bool
11+
12+ property level : Int64
13+
14+ property name : String
15+
16+ property parent_id : Int64
17+
18+ property position : Int64
19+
20+ property product_count : Int64
21+end
Test case

test/inputs/json/priority/bug855-short.json

1 generated file · +17 −0
Acrystaldefault / TopLevel.cr+17 −0
@@ -0,0 +1,17 @@
1+require "json"
2+
3+alias TopLevel = Hash(String, TopLevelValue)
4+
5+class TopLevelValue
6+ include JSON::Serializable
7+
8+ property channel_id : String
9+
10+ property channel_name : String
11+
12+ property code : String
13+
14+ property emoticon_set : Int64
15+
16+ property id : Int64
17+end
Test case

test/inputs/json/priority/bug863.json

1 generated file · +169 −0
Acrystaldefault / TopLevel.cr+169 −0
@@ -0,0 +1,169 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelUnion)
4+
5+class PurpleTopLevel
6+ include JSON::Serializable
7+
8+ @[JSON::Field(key: "ALIENLEVEL")]
9+ property alienlevel : Int64
10+
11+ @[JSON::Field(key: "BREED")]
12+ property breed : String
13+
14+ @[JSON::Field(key: "CHAR_DIMENSION")]
15+ property char_dimension : Int64
16+
17+ @[JSON::Field(key: "CHAR_INSTANCE")]
18+ property char_instance : Int64
19+
20+ @[JSON::Field(key: "DEFENDER_RANK_TITLE")]
21+ property defender_rank_title : String
22+
23+ @[JSON::Field(key: "FIRSTNAME")]
24+ property firstname : String
25+
26+ @[JSON::Field(key: "HEADID")]
27+ property headid : Int64
28+
29+ @[JSON::Field(key: "LASTNAME")]
30+ property lastname : String
31+
32+ @[JSON::Field(key: "LEVELX")]
33+ property levelx : Int64
34+
35+ @[JSON::Field(key: "NAME")]
36+ property name : String
37+
38+ @[JSON::Field(key: "PROF")]
39+ property prof : String
40+
41+ @[JSON::Field(key: "PROF_TITLE")]
42+ property prof_title : String
43+
44+ @[JSON::Field(key: "PVPRATING")]
45+ property pvprating : Int64
46+
47+ @[JSON::Field(key: "PVPTITLE")]
48+ property pvptitle : String
49+
50+ @[JSON::Field(key: "RANK")]
51+ property rank : Int64
52+
53+ @[JSON::Field(key: "RANK_TITLE")]
54+ property rank_title : String
55+
56+ @[JSON::Field(key: "SEX")]
57+ property sex : String
58+end
59+
60+class FluffyTopLevel
61+ include JSON::Serializable
62+
63+ @[JSON::Field(key: "ADVENTURERCOUNT")]
64+ property adventurercount : Int64
65+
66+ @[JSON::Field(key: "AGENTCOUNT")]
67+ property agentcount : Int64
68+
69+ @[JSON::Field(key: "ATROXCOUNT")]
70+ property atroxcount : Int64
71+
72+ @[JSON::Field(key: "AVGLVL")]
73+ property avglvl : Float64
74+
75+ @[JSON::Field(key: "BTCOUNT")]
76+ property btcount : Int64
77+
78+ @[JSON::Field(key: "DESCRIPTION")]
79+ property description : String
80+
81+ @[JSON::Field(key: "DOCTORCOUNT")]
82+ property doctorcount : Int64
83+
84+ @[JSON::Field(key: "ENFCOUNT")]
85+ property enfcount : Int64
86+
87+ @[JSON::Field(key: "ENGINEEERCOUNT")]
88+ property engineeercount : Int64
89+
90+ @[JSON::Field(key: "FEMALECOUNT")]
91+ property femalecount : Int64
92+
93+ @[JSON::Field(key: "FIXERCOUNT")]
94+ property fixercount : Int64
95+
96+ @[JSON::Field(key: "GOVERNINGNAME")]
97+ property governingname : String
98+
99+ @[JSON::Field(key: "HISTORY")]
100+ property history : String
101+
102+ @[JSON::Field(key: "KEEPERCOUNT")]
103+ property keepercount : Int64
104+
105+ @[JSON::Field(key: "MACOUNT")]
106+ property macount : Int64
107+
108+ @[JSON::Field(key: "MALECOUNT")]
109+ property malecount : Int64
110+
111+ @[JSON::Field(key: "MAXLVL")]
112+ property maxlvl : Int64
113+
114+ @[JSON::Field(key: "METACOUNT")]
115+ property metacount : Int64
116+
117+ @[JSON::Field(key: "MINLVL")]
118+ property minlvl : Int64
119+
120+ @[JSON::Field(key: "MONSTERCOUNT")]
121+ property monstercount : Int64
122+
123+ @[JSON::Field(key: "NAME")]
124+ property name : String
125+
126+ @[JSON::Field(key: "NANOCOUNT")]
127+ property nanocount : Int64
128+
129+ @[JSON::Field(key: "NANORACECOUNT")]
130+ property nanoracecount : Int64
131+
132+ @[JSON::Field(key: "NEUTERCOUNT")]
133+ property neutercount : Int64
134+
135+ @[JSON::Field(key: "NUMMEMBERS")]
136+ property nummembers : Int64
137+
138+ @[JSON::Field(key: "OBJECTIVE")]
139+ property objective : String
140+
141+ @[JSON::Field(key: "OPIFEXCOUNT")]
142+ property opifexcount : Int64
143+
144+ @[JSON::Field(key: "ORG_DIMENSION")]
145+ property org_dimension : Int64
146+
147+ @[JSON::Field(key: "ORG_INSTANCE")]
148+ property org_instance : Int64
149+
150+ @[JSON::Field(key: "SHADECOUNT")]
151+ property shadecount : Int64
152+
153+ @[JSON::Field(key: "SIDE")]
154+ property side : Int64
155+
156+ @[JSON::Field(key: "SIDE_NAME")]
157+ property side_name : String
158+
159+ @[JSON::Field(key: "SOLIDERCOUNT")]
160+ property solidercount : Int64
161+
162+ @[JSON::Field(key: "SOLITUSCOUNT")]
163+ property solituscount : Int64
164+
165+ @[JSON::Field(key: "TRADERCOUNT")]
166+ property tradercount : Int64
167+end
168+
169+alias TopLevelUnion = FluffyTopLevel | String | Array(PurpleTopLevel)
Test case

test/inputs/json/priority/coin-pairs.json

1 generated file · +29 −0
Acrystaldefault / TopLevel.cr+29 −0
@@ -0,0 +1,29 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property pairs : Hash(String, Pair)
7+
8+ property server_time : Int64
9+end
10+
11+class Pair
12+ include JSON::Serializable
13+
14+ property decimal_places : Int64
15+
16+ property fee : Float64
17+
18+ property hidden : Int64
19+
20+ property max_amount : Int64
21+
22+ property max_price : Int64
23+
24+ property min_amount : Float64
25+
26+ property min_price : Float64
27+
28+ property min_total : Float64
29+end
Test case

test/inputs/json/priority/combinations1.json

1 generated file · +731 −0
Acrystaldefault / TopLevel.cr+731 −0
@@ -0,0 +1,731 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property centrodesmose : String
7+
8+ property cerograph : Array(CerographElement?)
9+
10+ property chemotherapeutics : Array(ChemotherapeuticElement)
11+
12+ property cimelia : Array(CimeliaElement?)
13+
14+ property citrated : Int64
15+
16+ property clinodome : Array(Clinodome)
17+
18+ property coadjust : Array(CoadjustElement)
19+
20+ property consilience : Array(Consilience)
21+
22+ property constructor : Array(Constructor)
23+
24+ property continuative : Array(Continuative)
25+
26+ property credulity : Array(CredulityElement)
27+
28+ property creviced : Array(Creviced)
29+
30+ property cubiculum : Array(Array(Int64?))
31+
32+ property deruralize : Array(DeruralizeElement)
33+
34+ property diaereses : Array(DiaereseElement)
35+
36+ property dissolution : Array(Array(Nil)?)
37+
38+ property downstroke : Array(Downstroke)
39+
40+ property electrotautomerism : Array(Float64?)
41+
42+ property eleutheromania : Array(Eleutheromania)
43+
44+ property encrust : Encrust
45+
46+ property entomoid : Array(Entomoid)
47+
48+ property epipaleolithic : Array(Epipaleolithic)
49+
50+ property expropriable : Array(Expropriable)
51+
52+ property faggingly : Array(FagginglyElement)
53+
54+ property fenks : Array(FenkElement)
55+
56+ property flagmaking : Array(FlagmakingElement)
57+
58+ property fluorometer : Array(Fluorometer?)
59+
60+ property fulsome : Array(Int64?)
61+
62+ property fuzzy : Array(Fuzzy)
63+
64+ property gardenwards : Array(Gardenward)
65+
66+ property generalissimo : Array(Generalissimo?)
67+
68+ property habeas : Array(Hash(String, Int64)?)
69+
70+ property hemicrystalline : Array(Hemicrystalline)
71+
72+ property hemocoele : Array(HemocoeleElement)
73+
74+ property hoister : Array(Hoister?)
75+
76+ property hyperpiesis : Array(Hyperpiesi?)
77+
78+ property hyppish : Array(Hyppish?)
79+
80+ property idealizer : Array(Idealizer)
81+
82+ property incrustator : Array(Incrustator)
83+
84+ property intentiveness : Array(Intentiveness)
85+
86+ property interacinar : Interacinar
87+
88+ property intercorrelation : Array(Array(Int64)?)
89+
90+ property jacutinga : Array(Jacutinga)
91+end
92+
93+class CerographClass
94+ include JSON::Serializable
95+
96+ property apotropaion : Nil
97+
98+ property casuary : Nil
99+
100+ property creaker : Nil
101+
102+ property disqualification : Nil
103+
104+ property imperatorious : Nil
105+
106+ property impermeabilize : Nil
107+
108+ property metastoma : Nil
109+
110+ property noctidiurnal : Nil
111+
112+ property nonreserve : Nil
113+
114+ property ophthalmotonometry : Nil
115+
116+ property pailful : Nil
117+
118+ property pigfish : Nil
119+
120+ property pongee : Nil
121+
122+ property prosodical : Nil
123+
124+ property scrofuloderm : Nil
125+
126+ property storekeeping : Nil
127+
128+ property therologist : Nil
129+
130+ @[JSON::Field(key: "Tolowa")]
131+ property tolowa : Nil
132+
133+ property tradeful : Nil
134+
135+ property unriveting : Nil
136+end
137+
138+class ChemotherapeuticClass
139+ include JSON::Serializable
140+
141+ property angioneurotic : Nil
142+
143+ property availment : Nil
144+
145+ property bladelet : Nil
146+
147+ property catharticalness : Float64?
148+
149+ property caulis : Nil
150+
151+ property chalcus : Nil
152+
153+ @[JSON::Field(key: "Chirotherium")]
154+ property chirotherium : Int64?
155+
156+ property disdiapason : String?
157+
158+ property enteradenological : Nil
159+
160+ property homocerc : Bool?
161+
162+ property imporosity : Nil
163+
164+ property insistently : Nil
165+
166+ property intraparietal : Nil
167+
168+ property ivied : Nil
169+
170+ @[JSON::Field(key: "Maureen")]
171+ property maureen : Nil
172+
173+ property nonbookish : Nil
174+
175+ property nostochine : Nil
176+
177+ property nutcracker : Nil
178+
179+ property ofttimes : Nil
180+
181+ property phenocryst : Nil
182+
183+ property precoincident : Nil
184+
185+ property ramiferous : Nil
186+
187+ property stagmometer : Nil
188+
189+ property tetherball : Nil
190+
191+ property unshy : Nil
192+end
193+
194+class CimeliaClass
195+ include JSON::Serializable
196+
197+ property catharticalness : Float64
198+
199+ @[JSON::Field(key: "Chirotherium")]
200+ property chirotherium : Int64
201+
202+ property disdiapason : String
203+
204+ property homocerc : Bool
205+
206+ property nonbookish : Nil
207+end
208+
209+class CoadjustClass
210+ include JSON::Serializable
211+
212+ property amidosulphonal : Nil
213+
214+ @[JSON::Field(key: "Benny")]
215+ property benny : Nil
216+
217+ property catharticalness : Float64?
218+
219+ @[JSON::Field(key: "Chirotherium")]
220+ property chirotherium : Int64?
221+
222+ property disdiapason : String?
223+
224+ property ensnare : Nil
225+
226+ property homocerc : Bool?
227+
228+ property hybridizer : Nil
229+
230+ property leastwise : Nil
231+
232+ property lof : Nil
233+
234+ property monkhood : Nil
235+
236+ @[JSON::Field(key: "Netherlandish")]
237+ property netherlandish : Nil
238+
239+ property nonbookish : Nil
240+
241+ property peonism : Nil
242+
243+ @[JSON::Field(key: "Phonelescope")]
244+ property phonelescope : Nil
245+
246+ property porphyrogeniture : Nil
247+
248+ property preindemnify : Nil
249+
250+ property rosal : Nil
251+
252+ property scalenous : Nil
253+
254+ property scopine : Nil
255+
256+ @[JSON::Field(key: "Sedaceae")]
257+ property sedaceae : Nil
258+
259+ property suberinize : Nil
260+
261+ property symbiot : Nil
262+
263+ property tablefellow : Nil
264+
265+ property unchargeable : Nil
266+end
267+
268+class CredulityClass
269+ include JSON::Serializable
270+
271+ property ammonolytic : Nil
272+
273+ property bushmaster : Nil
274+
275+ property considering : Nil
276+
277+ property consuetudinary : Nil
278+
279+ property embarras : Nil
280+
281+ property fineness : Nil
282+
283+ property flaithship : Nil
284+
285+ @[JSON::Field(key: "Flavia")]
286+ property flavia : Nil
287+
288+ property gruffly : Nil
289+
290+ @[JSON::Field(key: "Hedychium")]
291+ property hedychium : Nil
292+
293+ property leadwort : Nil
294+
295+ property overseriously : Nil
296+
297+ property parabola : Nil
298+
299+ property pectinatodenticulate : Nil
300+
301+ @[JSON::Field(key: "Popean")]
302+ property popean : Nil
303+
304+ property pornocrat : Nil
305+
306+ property quadrisect : Nil
307+
308+ property seriality : Nil
309+
310+ property vamphorn : Nil
311+
312+ property wharp : Nil
313+end
314+
315+class DeruralizeClass
316+ include JSON::Serializable
317+
318+ property bockerel : Nil
319+
320+ property boulder : Nil
321+
322+ property churrus : Nil
323+
324+ property counterdigged : Nil
325+
326+ property dialogite : Nil
327+
328+ property digenic : Nil
329+
330+ property dunbird : Nil
331+
332+ property ergatogyne : Nil
333+
334+ property fiendful : Nil
335+
336+ property jackrod : Nil
337+
338+ @[JSON::Field(key: "Jehovistic")]
339+ property jehovistic : Nil
340+
341+ @[JSON::Field(key: "Paninean")]
342+ property paninean : Nil
343+
344+ property panther : Nil
345+
346+ property placentigerous : Nil
347+
348+ @[JSON::Field(key: "Romney")]
349+ property romney : Nil
350+
351+ property sparm : Nil
352+
353+ property tocsin : Nil
354+
355+ property unnicked : Nil
356+
357+ property unstavable : Nil
358+
359+ property windfirm : Nil
360+end
361+
362+class DiaereseClass
363+ include JSON::Serializable
364+
365+ @[JSON::Field(key: "Amoreuxia")]
366+ property amoreuxia : Nil
367+
368+ property ani : Nil
369+
370+ property bernicle : Nil
371+
372+ property blackwasher : Nil
373+
374+ property blowhard : Nil
375+
376+ property broma : Nil
377+
378+ property closecross : Nil
379+
380+ property congregationalism : Nil
381+
382+ property grayly : Nil
383+
384+ property historically : Nil
385+
386+ property hoast : Nil
387+
388+ property irretentive : Nil
389+
390+ property parcener : Nil
391+
392+ property pedder : Nil
393+
394+ property pseudoanatomic : Nil
395+
396+ property rhizocarpian : Nil
397+
398+ property samel : Nil
399+
400+ property silker : Nil
401+
402+ property subdentated : Nil
403+
404+ property subobscure : Nil
405+end
406+
407+class Encrust
408+ include JSON::Serializable
409+
410+ property comradely : Nil
411+
412+ property diacanthous : Nil
413+
414+ property feminineness : Nil
415+
416+ property gossamered : Nil
417+
418+ @[JSON::Field(key: "Hibernia")]
419+ property hibernia : Nil
420+
421+ @[JSON::Field(key: "Hibiscus")]
422+ property hibiscus : Nil
423+
424+ @[JSON::Field(key: "Lepidosauria")]
425+ property lepidosauria : Nil
426+
427+ property lollingly : Nil
428+
429+ property manager : Nil
430+
431+ property mechanic : Nil
432+
433+ property overminuteness : Nil
434+
435+ property papelonne : Nil
436+
437+ property plebification : Nil
438+
439+ property pugmiller : Nil
440+
441+ property recoveror : Nil
442+
443+ property spermatoblastic : Nil
444+
445+ @[JSON::Field(key: "Syllidae")]
446+ property syllidae : Nil
447+
448+ property ungyved : Nil
449+
450+ property whirlabout : Nil
451+
452+ property woodenware : Nil
453+end
454+
455+class FagginglyClass
456+ include JSON::Serializable
457+
458+ property abranchian : Nil
459+
460+ property aculeiform : Nil
461+
462+ property adiaphoristic : Nil
463+
464+ property adoptionism : Nil
465+
466+ @[JSON::Field(key: "Anglic")]
467+ property anglic : Nil
468+
469+ property antrotomy : Nil
470+
471+ property coerciveness : Nil
472+
473+ property decorist : Nil
474+
475+ property duckhood : Nil
476+
477+ @[JSON::Field(key: "Heteromeri")]
478+ property heteromeri : Nil
479+
480+ property hypochnose : Nil
481+
482+ property lochage : Nil
483+
484+ property melee : Nil
485+
486+ property nonconformitant : Nil
487+
488+ @[JSON::Field(key: "Poinsettia")]
489+ property poinsettia : Nil
490+
491+ property putatively : Nil
492+
493+ property semivolatile : Nil
494+
495+ property soleas : Nil
496+
497+ property unfastenable : Nil
498+
499+ property unmillinered : Nil
500+end
501+
502+class FenkClass
503+ include JSON::Serializable
504+
505+ property apoise : Nil
506+
507+ property astronomize : Nil
508+
509+ property cockhorse : Nil
510+
511+ property copular : Nil
512+
513+ @[JSON::Field(key: "Dagomba")]
514+ property dagomba : Nil
515+
516+ property draffy : Nil
517+
518+ property foreigner : Nil
519+
520+ @[JSON::Field(key: "Guyandot")]
521+ property guyandot : Nil
522+
523+ property neurogliosis : Nil
524+
525+ property osmious : Nil
526+
527+ property palpitate : Nil
528+
529+ property rebukeable : Nil
530+
531+ @[JSON::Field(key: "Reinwardtia")]
532+ property reinwardtia : Nil
533+
534+ property reservatory : Nil
535+
536+ property scalt : Nil
537+
538+ property scripturalize : Nil
539+
540+ property tintometer : Nil
541+
542+ @[JSON::Field(key: "Tritoness")]
543+ property tritoness : Nil
544+
545+ property undergrade : Nil
546+
547+ property undermountain : Nil
548+end
549+
550+class FlagmakingClass
551+ include JSON::Serializable
552+
553+ property albarco : Nil
554+
555+ @[JSON::Field(key: "Bunodonta")]
556+ property bunodonta : Nil
557+
558+ property hornify : Nil
559+
560+ @[JSON::Field(key: "Hydrocorisae")]
561+ property hydrocorisae : Nil
562+
563+ property hypoglossus : Nil
564+
565+ property inexpiably : Nil
566+
567+ property ingratitude : Nil
568+
569+ property ladyfly : Nil
570+
571+ property medicament : Nil
572+
573+ property monogrammatic : Nil
574+
575+ property nobbut : Nil
576+
577+ @[JSON::Field(key: "Notacanthidae")]
578+ property notacanthidae : Nil
579+
580+ property polyplacophore : Nil
581+
582+ property proexercise : Nil
583+
584+ property protoplast : Nil
585+
586+ property puzzling : Nil
587+
588+ property splanchnoskeleton : Nil
589+
590+ property unloveliness : Nil
591+
592+ property unquarantined : Nil
593+
594+ property unrenounceable : Nil
595+end
596+
597+class HemocoeleClass
598+ include JSON::Serializable
599+
600+ property acrogamy : Nil
601+
602+ property amelification : Nil
603+
604+ property autobiographic : Nil
605+
606+ property berat : Nil
607+
608+ property catharticalness : Float64?
609+
610+ @[JSON::Field(key: "Chirotherium")]
611+ property chirotherium : Int64?
612+
613+ property disdiapason : String?
614+
615+ property disproportionably : Nil
616+
617+ property erythrite : Nil
618+
619+ property graphic : Nil
620+
621+ property hepatological : Nil
622+
623+ property homocerc : Bool?
624+
625+ property incommensurably : Nil
626+
627+ property misaffirm : Nil
628+
629+ property nonbookish : Nil
630+
631+ property pocketbook : Nil
632+
633+ property sclerometric : Nil
634+
635+ property stambouline : Nil
636+
637+ property stickpin : Nil
638+
639+ property tubulure : Nil
640+
641+ property undelated : Nil
642+
643+ property unsalt : Nil
644+
645+ property untutelar : Nil
646+
647+ property vagrant : Nil
648+
649+ @[JSON::Field(key: "Walt")]
650+ property walt : Nil
651+end
652+
653+class Interacinar
654+ include JSON::Serializable
655+
656+ property assapan : Float64
657+
658+ property benefactorship : Bool
659+
660+ property triseriatim : String
661+
662+ property tubbing : Int64
663+
664+ property untrimmed : Nil
665+end
666+
667+alias CerographElement = CerographClass | String
668+
669+alias ChemotherapeuticElement = ChemotherapeuticClass | Int64
670+
671+alias CimeliaElement = CimeliaClass | Array(Int64)
672+
673+alias Clinodome = Float64 | String
674+
675+alias CoadjustElement = CoadjustClass | Float64
676+
677+alias Consilience = Float64 | Hash(String, Int64)
678+
679+alias Constructor = Bool | Hash(String, Int64?)
680+
681+alias Continuative = Hash(String, Int64) | String
682+
683+alias CredulityElement = CredulityClass | Int64 | String
684+
685+alias Creviced = Hash(String, Int64) | Bool | String
686+
687+alias DeruralizeElement = DeruralizeClass | Array(Nil) | Bool
688+
689+alias DiaereseElement = DiaereseClass | Array(Int64) | Bool
690+
691+alias Downstroke = Array(Nil) | Bool | String
692+
693+alias Eleutheromania = Float64 | Hash(String, Int64) | String
694+
695+alias Entomoid = CimeliaClass | Int64
696+
697+alias Epipaleolithic = Float64 | Array(Int64)
698+
699+alias Expropriable = CimeliaClass | Float64 | Array(Nil)
700+
701+alias FagginglyElement = Float64 | FagginglyClass
702+
703+alias FenkElement = FenkClass | String
704+
705+alias FlagmakingElement = Float64 | FlagmakingClass | Bool
706+
707+alias Fluorometer = Int64 | String
708+
709+alias Fuzzy = Int64 | Hash(String, Int64?)
710+
711+alias Gardenward = Array(Int64) | Bool | String
712+
713+alias Generalissimo = Hash(String, Int64) | Bool
714+
715+alias Hemicrystalline = CimeliaClass | String
716+
717+alias HemocoeleElement = HemocoeleClass | Array(Int64)
718+
719+alias Hoister = CimeliaClass | String
720+
721+alias Hyperpiesi = CimeliaClass | Array(Nil)
722+
723+alias Hyppish = Bool | String
724+
725+alias Idealizer = CimeliaClass | Int64 | Array(Nil)
726+
727+alias Incrustator = Int64 | Array(Int64) | String
728+
729+alias Intentiveness = CimeliaClass | Float64 | String
730+
731+alias Jacutinga = Array(Int64) | Hash(String, Int64?)
Test case

test/inputs/json/priority/combinations2.json

1 generated file · +650 −0
Acrystaldefault / TopLevel.cr+650 −0
@@ -0,0 +1,650 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "Abranchiata")]
7+ property abranchiata : Array(Abranchiata?)
8+
9+ property academe : Array(Academe)
10+
11+ property acquirable : Array(Acquirable)
12+
13+ property aerometry : Array(Aerometry)
14+
15+ property alexin : Array(Alexin)
16+
17+ property alleviate : Array(AlleviateElement)
18+
19+ property amaas : Array(Amaa)
20+
21+ property ambassage : Array(Ambassage)
22+
23+ property amphithyron : Array(Amphithyron?)
24+
25+ @[JSON::Field(key: "Andriana")]
26+ property andriana : Array(String?)
27+
28+ property ankee : Array(AnkeeElement)
29+
30+ property annihilator : Array(Hash(String, Int64?)?)
31+
32+ property annulose : Nil
33+
34+ @[JSON::Field(key: "Ansarie")]
35+ property ansarie : Array(AnsarieElement?)
36+
37+ property aphasia : Array(Aphasia)
38+
39+ property asprawl : Array(Asprawl)
40+
41+ property attractive : Array(Bool?)
42+
43+ property barksome : Hash(String, Int64)
44+
45+ property bedesman : Array(Bedesman)
46+
47+ property belard : Array(Belard)
48+
49+ property bocking : Array(Bocking)
50+
51+ property brawlingly : Array(Brawlingly)
52+
53+ property brookie : Array(Brookie)
54+
55+ property bumboatman : Array(Bumboatman?)
56+
57+ property bystreet : Array(Nil)
58+
59+ property calaverite : Array(Calaverite)
60+
61+ property catallactic : Array(Catallactic)
62+
63+ property cemental : Array(Cemental)
64+
65+ @[JSON::Field(key: "Chytridiaceae")]
66+ property chytridiaceae : Array(ChytridiaceaeElement?)
67+
68+ @[JSON::Field(key: "Discordia")]
69+ property discordia : Array(DiscordiaElement)
70+
71+ @[JSON::Field(key: "Endomyces")]
72+ property endomyces : Array(Endomyce)
73+
74+ @[JSON::Field(key: "Epinephelidae")]
75+ property epinephelidae : Array(Epinephelidae)
76+
77+ @[JSON::Field(key: "Eupatorium")]
78+ property eupatorium : Array(Eupatorium)
79+
80+ @[JSON::Field(key: "Gryphosaurus")]
81+ property gryphosaurus : Array(GryphosaurusElement)
82+
83+ @[JSON::Field(key: "Koryak")]
84+ property koryak : Array(Koryak)
85+
86+ @[JSON::Field(key: "Lavinia")]
87+ property lavinia : Array(LaviniaElement)
88+
89+ @[JSON::Field(key: "Oskar")]
90+ property oskar : Array(OskarElement)
91+
92+ @[JSON::Field(key: "Rebecca")]
93+ property rebecca : Array(RebeccaElement)
94+
95+ @[JSON::Field(key: "Rhomboganoidei")]
96+ property rhomboganoidei : Array(Rhomboganoidei)
97+
98+ @[JSON::Field(key: "Rigsmal")]
99+ property rigsmal : Bool
100+
101+ @[JSON::Field(key: "Ruellia")]
102+ property ruellia : Array(Ruellia)
103+
104+ @[JSON::Field(key: "School")]
105+ property school : Array(School?)
106+
107+ @[JSON::Field(key: "Shakespearolater")]
108+ property shakespearolater : Array(Shakespearolater)
109+
110+ @[JSON::Field(key: "Svan")]
111+ property svan : Array(Float64)
112+
113+ @[JSON::Field(key: "Wayao")]
114+ property wayao : Hash(String, Float64)
115+end
116+
117+class AlleviateClass
118+ include JSON::Serializable
119+
120+ property apriori : Nil
121+
122+ property beggarer : Nil
123+
124+ property brokenheartedly : Nil
125+
126+ property debilitation : Nil
127+
128+ property frike : Nil
129+
130+ property gastrolith : Nil
131+
132+ @[JSON::Field(key: "Hulsean")]
133+ property hulsean : Nil
134+
135+ property orthocentric : Nil
136+
137+ property petaly : Nil
138+
139+ property probudgeting : Nil
140+
141+ property reacquire : Nil
142+
143+ property scow : Nil
144+
145+ property shutoff : Nil
146+
147+ property subcontiguous : Nil
148+
149+ property suffumigate : Nil
150+
151+ property transformable : Nil
152+
153+ property uncoroneted : Nil
154+
155+ property unparking : Nil
156+
157+ property unvarnishedness : Nil
158+
159+ property wherewithal : Nil
160+end
161+
162+class Rebecca
163+ include JSON::Serializable
164+
165+ property catharticalness : Float64
166+
167+ @[JSON::Field(key: "Chirotherium")]
168+ property chirotherium : Int64
169+
170+ property disdiapason : String
171+
172+ property homocerc : Bool
173+
174+ property nonbookish : Nil
175+end
176+
177+class Amphithyron
178+ include JSON::Serializable
179+
180+ property akroasis : Int64?
181+
182+ property antiphonical : Int64?
183+
184+ property basebred : Int64?
185+
186+ property catharticalness : Float64?
187+
188+ @[JSON::Field(key: "Chirotherium")]
189+ property chirotherium : Int64?
190+
191+ property conductometric : Int64?
192+
193+ property disdiapason : String?
194+
195+ property ensilation : Int64?
196+
197+ property eyebolt : Int64?
198+
199+ property fistulated : Int64?
200+
201+ property heteropod : Int64?
202+
203+ property homocerc : Bool?
204+
205+ @[JSON::Field(key: "Juniperus")]
206+ property juniperus : Int64?
207+
208+ property labyrinthically : Int64?
209+
210+ property martyrization : Int64?
211+
212+ property mispolicy : Int64?
213+
214+ property multipara : Int64?
215+
216+ @[JSON::Field(key: "Nazirite")]
217+ property nazirite : Int64?
218+
219+ property nonbookish : Nil
220+
221+ property possessorial : Int64?
222+
223+ property shamed : Int64?
224+
225+ property shelfworn : Int64?
226+
227+ property stagnum : Int64?
228+
229+ @[JSON::Field(key: "Those")]
230+ property those : Int64?
231+
232+ property undecimal : Int64?
233+end
234+
235+class AnkeeClass
236+ include JSON::Serializable
237+
238+ @[JSON::Field(key: "Anomoean")]
239+ property anomoean : Nil
240+
241+ property barleyhood : Nil
242+
243+ property befriender : Nil
244+
245+ property brutishness : Nil
246+
247+ property cephalalgy : Nil
248+
249+ property cirurgian : Nil
250+
251+ property conventionally : Nil
252+
253+ property jackshay : Nil
254+
255+ property milammeter : Nil
256+
257+ @[JSON::Field(key: "Naja")]
258+ property naja : Nil
259+
260+ property ombrological : Nil
261+
262+ property phonasthenia : Nil
263+
264+ property retrievableness : Nil
265+
266+ property snakily : Nil
267+
268+ property swot : Nil
269+
270+ property tartlet : Nil
271+
272+ property thiofuran : Nil
273+
274+ property tracheophone : Nil
275+
276+ property tuglike : Nil
277+
278+ property unscratchingly : Nil
279+end
280+
281+class AnsarieClass
282+ include JSON::Serializable
283+
284+ property accension : Nil
285+
286+ @[JSON::Field(key: "Alida")]
287+ property alida : Nil
288+
289+ property asteria : Nil
290+
291+ property beriberic : Nil
292+
293+ property edgebone : Nil
294+
295+ property gastrodialysis : Nil
296+
297+ property geographic : Nil
298+
299+ @[JSON::Field(key: "Ictonyx")]
300+ property ictonyx : Nil
301+
302+ property metrocele : Nil
303+
304+ property misgraft : Nil
305+
306+ property monteith : Nil
307+
308+ property notcher : Nil
309+
310+ property prorestriction : Nil
311+
312+ @[JSON::Field(key: "Ramist")]
313+ property ramist : Nil
314+
315+ property throatlet : Nil
316+
317+ property unfair : Nil
318+
319+ property unsynonymous : Nil
320+
321+ property water : Nil
322+
323+ property zestfully : Nil
324+
325+ property zincic : Nil
326+end
327+
328+class ChytridiaceaeClass
329+ include JSON::Serializable
330+
331+ @[JSON::Field(key: "Batidaceae")]
332+ property batidaceae : Nil
333+
334+ @[JSON::Field(key: "Brechites")]
335+ property brechites : Nil
336+
337+ property codespairer : Nil
338+
339+ @[JSON::Field(key: "Emery")]
340+ property emery : Nil
341+
342+ property enervative : Nil
343+
344+ property excriminate : Nil
345+
346+ property goshenite : Nil
347+
348+ property grime : Nil
349+
350+ property gritten : Nil
351+
352+ property hectorly : Nil
353+
354+ property intermediation : Nil
355+
356+ property meeterly : Nil
357+
358+ @[JSON::Field(key: "Narraganset")]
359+ property narraganset : Nil
360+
361+ property onymatic : Nil
362+
363+ property paddlecock : Nil
364+
365+ property thana : Nil
366+
367+ property thornily : Nil
368+
369+ property uckia : Nil
370+
371+ property unmettle : Nil
372+
373+ property vorticellid : Nil
374+end
375+
376+class DiscordiaClass
377+ include JSON::Serializable
378+
379+ @[JSON::Field(key: "Altaic")]
380+ property altaic : Int64?
381+
382+ property amoristic : Int64?
383+
384+ property blennophthalmia : Int64?
385+
386+ property catharticalness : Float64?
387+
388+ @[JSON::Field(key: "Chirotherium")]
389+ property chirotherium : Int64?
390+
391+ property disciplinability : Int64?
392+
393+ property disdiapason : String?
394+
395+ property goofer : Int64?
396+
397+ property homocerc : Bool?
398+
399+ property laryngograph : Int64?
400+
401+ property leucitis : Int64?
402+
403+ property lymphocyst : Int64?
404+
405+ property microcosmology : Int64?
406+
407+ property nauseation : Int64?
408+
409+ property nonbookish : Nil
410+
411+ @[JSON::Field(key: "Patarin")]
412+ property patarin : Int64?
413+
414+ property preliberal : Int64?
415+
416+ property prettifier : Int64?
417+
418+ property rangework : Int64?
419+
420+ property redient : Int64?
421+
422+ property subfusiform : Int64?
423+
424+ property suicidical : Int64?
425+
426+ property swow : Int64?
427+
428+ property wastrel : Int64?
429+
430+ property wingle : Int64?
431+end
432+
433+class GryphosaurusClass
434+ include JSON::Serializable
435+
436+ property amissibility : Nil
437+
438+ @[JSON::Field(key: "Burushaski")]
439+ property burushaski : Nil
440+
441+ property citronin : Nil
442+
443+ property coplaintiff : Nil
444+
445+ property disquisitionary : Nil
446+
447+ property enoplan : Nil
448+
449+ property faintness : Nil
450+
451+ property hebetomy : Nil
452+
453+ property islandry : Nil
454+
455+ property lameduck : Nil
456+
457+ property overbattle : Nil
458+
459+ property overinterested : Nil
460+
461+ property phrenologic : Nil
462+
463+ property rainband : Nil
464+
465+ property shiningly : Nil
466+
467+ property stamineous : Nil
468+
469+ property subscapularis : Nil
470+
471+ @[JSON::Field(key: "Tahami")]
472+ property tahami : Nil
473+
474+ property undaubed : Nil
475+
476+ property underntime : Nil
477+end
478+
479+class LaviniaClass
480+ include JSON::Serializable
481+
482+ property agitable : Int64?
483+
484+ property asininity : Int64?
485+
486+ property benefiter : Int64?
487+
488+ property bronzelike : Int64?
489+
490+ property catharticalness : Float64?
491+
492+ @[JSON::Field(key: "Chirotherium")]
493+ property chirotherium : Int64?
494+
495+ property cholesteatomatous : Int64?
496+
497+ property deprivement : Int64?
498+
499+ property disdiapason : String?
500+
501+ property flippantness : Int64?
502+
503+ property fogproof : Int64?
504+
505+ property homocerc : Bool?
506+
507+ property merrymeeting : Int64?
508+
509+ property nonbookish : Nil
510+
511+ property overcareful : Int64?
512+
513+ property panaris : Int64?
514+
515+ property preacceptance : Int64?
516+
517+ property quinoxaline : Int64?
518+
519+ property sig : Int64?
520+
521+ property superconfusion : Int64?
522+
523+ @[JSON::Field(key: "Tacana")]
524+ property tacana : Int64?
525+
526+ property tillotter : Int64?
527+
528+ property tranquillize : Int64?
529+
530+ property unquestionable : Int64?
531+
532+ property uproute : Int64?
533+end
534+
535+class OskarClass
536+ include JSON::Serializable
537+
538+ @[JSON::Field(key: "Acrobates")]
539+ property acrobates : Nil
540+
541+ property beanshooter : Nil
542+
543+ property bearhound : Nil
544+
545+ @[JSON::Field(key: "Cayuga")]
546+ property cayuga : Nil
547+
548+ property guarneri : Nil
549+
550+ property hypochondriacism : Nil
551+
552+ property indication : Nil
553+
554+ property jaculative : Nil
555+
556+ property nagana : Nil
557+
558+ @[JSON::Field(key: "Netherlandish")]
559+ property netherlandish : Nil
560+
561+ property noctivagous : Nil
562+
563+ property nonphysiological : Nil
564+
565+ property praxis : Nil
566+
567+ property provision : Nil
568+
569+ property subterhuman : Nil
570+
571+ property sunlit : Nil
572+
573+ property syncraniate : Nil
574+
575+ property teachment : Nil
576+
577+ property unmutinous : Nil
578+
579+ property unstoppable : Nil
580+end
581+
582+alias Abranchiata = Int64 | Array(Int64)
583+
584+alias Academe = Int64 | Array(Int64) | Hash(String, Int64)
585+
586+alias Acquirable = Hash(String, Int64) | Array(Int64?)
587+
588+alias Aerometry = Float64 | Bool
589+
590+alias Alexin = Array(Int64) | Bool
591+
592+alias AlleviateElement = AlleviateClass | Array(Int64?)
593+
594+alias Amaa = Int64 | Bool | Rebecca
595+
596+alias Ambassage = Array(Nil) | String
597+
598+alias AnkeeElement = AnkeeClass | Int64 | Array(Int64)
599+
600+alias AnsarieElement = AnsarieClass | Array(Int64)
601+
602+alias Aphasia = Int64 | Array(Int64)
603+
604+alias Asprawl = Float64 | String
605+
606+alias Bedesman = Float64 | Bool | String
607+
608+alias Belard = Float64 | Array(Int64) | Rebecca
609+
610+alias Bocking = Array(Int64) | Hash(String, Int64) | Bool
611+
612+alias Brawlingly = Array(Nil) | Hash(String, Int64?)
613+
614+alias Brookie = Array(Int64) | Rebecca
615+
616+alias Bumboatman = Array(Nil) | String
617+
618+alias Calaverite = Array(Int64) | String
619+
620+alias Catallactic = Hash(String, Int64) | Array(Nil) | Bool
621+
622+alias Cemental = Float64 | Array(Int64) | Hash(String, Int64)
623+
624+alias ChytridiaceaeElement = ChytridiaceaeClass | Bool
625+
626+alias DiscordiaElement = DiscordiaClass | Array(Int64)
627+
628+alias Endomyce = Int64 | String
629+
630+alias Epinephelidae = Int64 | Bool | String
631+
632+alias Eupatorium = Hash(String, Int64) | Array(Nil)
633+
634+alias GryphosaurusElement = GryphosaurusClass | Array(Int64) | String
635+
636+alias Koryak = String | Hash(String, Int64?)
637+
638+alias LaviniaElement = LaviniaClass | String
639+
640+alias OskarElement = Array(Int64) | OskarClass
641+
642+alias RebeccaElement = Int64 | String | Rebecca
643+
644+alias Rhomboganoidei = Array(Int64) | String | Rebecca
645+
646+alias Ruellia = Bool | String | Rebecca
647+
648+alias School = Int64 | Hash(String, Int64)
649+
650+alias Shakespearolater = Float64 | Array(Int64) | String
Test case

test/inputs/json/priority/combinations3.json

1 generated file · +836 −0
Acrystaldefault / TopLevel.cr+836 −0
@@ -0,0 +1,836 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property juror : Array(JurorElement)
7+
8+ property kongoni : Array(Kongoni)
9+
10+ property ladronism : Array(LadronismElement)
11+
12+ property landlubberly : Array(LandlubberlyElement)
13+
14+ property listener : Array(Listener)
15+
16+ property lupus : Array(LupusElement)
17+
18+ property maslin : Array(Maslin)
19+
20+ property monazite : Array(MonaziteElement)
21+
22+ property monoliteral : Array(Monoliteral)
23+
24+ property monotheistically : Array(MonotheisticallyElement)
25+
26+ property montage : Array(Montage)
27+
28+ property moralness : Array(Moralness?)
29+
30+ property mowra : Array(MonaziteClass?)
31+
32+ property mulishly : Array(Mulishly?)
33+
34+ property myoscope : Array(Myoscope)
35+
36+ property nach : Array(Array(Int64?)?)
37+
38+ property neuromastic : Array(Neuromastic)
39+
40+ property noncontributing : Array(Noncontributing)
41+
42+ property nonnervous : Array(Nonnervous)
43+
44+ property nonvaluation : Array(Nonvaluation)
45+
46+ property occupationalist : Array(OccupationalistElement?)
47+
48+ property outrival : Array(OutrivalElement?)
49+
50+ property paleographically : Array(Paleographically)
51+
52+ property pamphletwise : Array(Pamphletwise)
53+
54+ property pediatrics : Array(Pediatric?)
55+
56+ property perceptive : Array(Bool)
57+
58+ property piaculum : Array(PiaculumElement)
59+
60+ property piccadilly : Array(Piccadilly?)
61+
62+ property piffler : Array(Piffler)
63+
64+ property pithful : Array(Pithful?)
65+
66+ property placuntitis : Array(Placuntiti)
67+
68+ property plectopterous : Array(Plectopterous)
69+
70+ property pneumocele : Array(Pneumocele?)
71+
72+ property poliorcetic : Array(Poliorcetic)
73+
74+ property poormaster : Array(Poormaster?)
75+
76+ property potwhisky : Array(PotwhiskyElement?)
77+
78+ property practicalizer : Array(Practicalizer)
79+
80+ property prefreshman : Array(PrefreshmanElement)
81+
82+ property prehensility : Array(Prehensility)
83+
84+ property prevoidance : Array(Prevoidance)
85+
86+ property probant : Array(Hash(String, Int64?))
87+
88+ property protext : Array(Protext)
89+end
90+
91+class JurorClass
92+ include JSON::Serializable
93+
94+ property adipsy : Nil
95+
96+ property auxiliator : Nil
97+
98+ property benda : Nil
99+
100+ property benjamin : Nil
101+
102+ property brandling : Nil
103+
104+ property epicurishly : Nil
105+
106+ property eremochaetous : Nil
107+
108+ property marten : Nil
109+
110+ property monocline : Nil
111+
112+ @[JSON::Field(key: "Olea")]
113+ property olea : Nil
114+
115+ property palgat : Nil
116+
117+ property pennyworth : Nil
118+
119+ property pioury : Nil
120+
121+ property pragmatistic : Nil
122+
123+ property stylelessness : Nil
124+
125+ property systematical : Nil
126+
127+ property thready : Nil
128+
129+ property uncontemporary : Nil
130+
131+ property uncouched : Nil
132+
133+ property uninhabitedness : Nil
134+end
135+
136+class LadronismClass
137+ include JSON::Serializable
138+
139+ property acclaimer : Nil
140+
141+ property achree : Nil
142+
143+ property base : Nil
144+
145+ property conundrumize : Nil
146+
147+ property degerminator : Nil
148+
149+ property describable : Nil
150+
151+ property exasperatedly : Nil
152+
153+ property heroine : Nil
154+
155+ property indazin : Nil
156+
157+ property luteous : Nil
158+
159+ property papular : Nil
160+
161+ property pritch : Nil
162+
163+ @[JSON::Field(key: "Prodenia")]
164+ property prodenia : Nil
165+
166+ property seege : Nil
167+
168+ property shopgirl : Nil
169+
170+ property tragedietta : Nil
171+
172+ property unsparse : Nil
173+
174+ property uplook : Nil
175+
176+ property vermiformis : Nil
177+
178+ property whafabout : Nil
179+end
180+
181+class LandlubberlyClass
182+ include JSON::Serializable
183+
184+ property acropoleis : Nil
185+
186+ property aminate : Nil
187+
188+ @[JSON::Field(key: "Amyraldism")]
189+ property amyraldism : Nil
190+
191+ property bipenniform : Nil
192+
193+ property bugre : Nil
194+
195+ property calycule : Nil
196+
197+ property caoutchouc : Nil
198+
199+ property disprover : Nil
200+
201+ property fitroot : Nil
202+
203+ property fulgently : Nil
204+
205+ property kickup : Nil
206+
207+ property laevoversion : Nil
208+
209+ property moter : Nil
210+
211+ property objectivity : Nil
212+
213+ property posterity : Nil
214+
215+ property postnuptial : Nil
216+
217+ property precedentary : Nil
218+
219+ property saddling : Nil
220+
221+ property subcurrent : Nil
222+
223+ property unrecriminative : Nil
224+end
225+
226+class LupusClass
227+ include JSON::Serializable
228+
229+ property catharticalness : Float64?
230+
231+ @[JSON::Field(key: "Chirotherium")]
232+ property chirotherium : Int64?
233+
234+ @[JSON::Field(key: "Chlorioninae")]
235+ property chlorioninae : Int64?
236+
237+ @[JSON::Field(key: "Corvinae")]
238+ property corvinae : Int64?
239+
240+ @[JSON::Field(key: "Crassina")]
241+ property crassina : Int64?
242+
243+ property disdiapason : String?
244+
245+ property exiguity : Int64?
246+
247+ property farcist : Int64?
248+
249+ property holographical : Int64?
250+
251+ property homocerc : Bool?
252+
253+ property ichthyophagan : Int64?
254+
255+ property implacable : Int64?
256+
257+ property nonbookish : Nil
258+
259+ property outshiner : Int64?
260+
261+ property overweather : Int64?
262+
263+ property protonegroid : Int64?
264+
265+ property shallowish : Int64?
266+
267+ property snoke : Int64?
268+
269+ property snout : Int64?
270+
271+ property surveillance : Int64?
272+
273+ property threshingtime : Int64?
274+
275+ @[JSON::Field(key: "Thysanocarpus")]
276+ property thysanocarpus : Int64?
277+
278+ property unsignificantly : Int64?
279+
280+ property unsnap : Int64?
281+
282+ property vendible : Int64?
283+end
284+
285+class Maslin
286+ include JSON::Serializable
287+
288+ @[JSON::Field(key: "Alicant")]
289+ property alicant : Int64?
290+
291+ property antiatonement : Nil
292+
293+ property anticorrosive : Int64?
294+
295+ property aphidozer : Nil
296+
297+ @[JSON::Field(key: "Bakuninist")]
298+ property bakuninist : Nil
299+
300+ property be : Int64?
301+
302+ property catharticalness : Float64?
303+
304+ @[JSON::Field(key: "Chirotherium")]
305+ property chirotherium : Int64?
306+
307+ property chub : Int64?
308+
309+ property cuprosilicon : Int64?
310+
311+ property curtailedly : Int64?
312+
313+ property dellenite : Int64?
314+
315+ @[JSON::Field(key: "Dimitry")]
316+ property dimitry : Int64?
317+
318+ property disdiapason : String?
319+
320+ property edifying : Nil
321+
322+ property ethmoiditis : Int64?
323+
324+ property gastralgy : Nil
325+
326+ property goatherd : Int64?
327+
328+ property hammerdress : Int64?
329+
330+ property hangfire : Nil
331+
332+ property homocerc : Bool?
333+
334+ property lacunosity : Int64?
335+
336+ property longiloquence : Nil
337+
338+ property mameliere : Int64?
339+
340+ property motherless : Nil
341+
342+ property nonbookish : Nil
343+
344+ property noncorrodible : Nil
345+
346+ property nonsensicality : Nil
347+
348+ property oafishly : Int64?
349+
350+ property pfund : Nil
351+
352+ property preadvisory : Nil
353+
354+ property retroflexed : Nil
355+
356+ property saccharulmic : Int64?
357+
358+ property scowlful : Int64?
359+
360+ property secluded : Nil
361+
362+ property slackage : Nil
363+
364+ property sphaeridial : Int64?
365+
366+ property spondulics : Nil
367+
368+ property subsecive : Int64?
369+
370+ property swellmobsman : Nil
371+
372+ property trachyglossate : Int64?
373+
374+ property trialogue : Nil
375+
376+ property unassuaged : Int64?
377+
378+ property ungross : Nil
379+
380+ property unjudiciously : Nil
381+end
382+
383+class MonaziteClass
384+ include JSON::Serializable
385+
386+ property catharticalness : Float64
387+
388+ @[JSON::Field(key: "Chirotherium")]
389+ property chirotherium : Int64
390+
391+ property disdiapason : String
392+
393+ property homocerc : Bool
394+
395+ property nonbookish : Nil
396+end
397+
398+class MonotheisticallyClass
399+ include JSON::Serializable
400+
401+ property blaspheme : Nil
402+
403+ property catharticalness : Float64?
404+
405+ property celiosalpingectomy : Nil
406+
407+ @[JSON::Field(key: "Chirotherium")]
408+ property chirotherium : Int64?
409+
410+ property consummativeness : Nil
411+
412+ property disdiapason : String?
413+
414+ property egestive : Nil
415+
416+ property enchylema : Nil
417+
418+ property gasconade : Nil
419+
420+ property holidayer : Nil
421+
422+ property homocerc : Bool?
423+
424+ property intuitionalism : Nil
425+
426+ property lophiostomate : Nil
427+
428+ property nonbookish : Nil
429+
430+ property nonvolition : Nil
431+
432+ property palatableness : Nil
433+
434+ property pimpery : Nil
435+
436+ property previolation : Nil
437+
438+ property reconveyance : Nil
439+
440+ property registership : Nil
441+
442+ property rhyacolite : Nil
443+
444+ property smithereens : Nil
445+
446+ property superedification : Nil
447+
448+ property trust : Nil
449+
450+ property whitestone : Nil
451+end
452+
453+class Noncontributing
454+ include JSON::Serializable
455+
456+ property estevin : String
457+
458+ property jolterhead : Float64
459+
460+ property sauternes : Int64
461+
462+ property sparsely : Bool
463+
464+ property unrequested : Nil
465+end
466+
467+class OccupationalistClass
468+ include JSON::Serializable
469+
470+ property beholdable : Nil
471+
472+ property brotuliform : Nil
473+
474+ @[JSON::Field(key: "Chimakum")]
475+ property chimakum : Nil
476+
477+ property doodler : Nil
478+
479+ property emulsin : Nil
480+
481+ @[JSON::Field(key: "Fin")]
482+ property fin : Nil
483+
484+ property flourishing : Nil
485+
486+ property flueless : Nil
487+
488+ property furtively : Nil
489+
490+ property gritter : Nil
491+
492+ property interwish : Nil
493+
494+ property monoxylic : Nil
495+
496+ property myristic : Nil
497+
498+ property nightwear : Nil
499+
500+ property peruser : Nil
501+
502+ property theoastrological : Nil
503+
504+ property thumby : Nil
505+
506+ property tingitid : Nil
507+
508+ property trailless : Nil
509+
510+ property unpocketed : Nil
511+end
512+
513+class OutrivalClass
514+ include JSON::Serializable
515+
516+ property adroitly : Nil
517+
518+ property bridehood : Nil
519+
520+ @[JSON::Field(key: "Castoroides")]
521+ property castoroides : Nil
522+
523+ @[JSON::Field(key: "Czechoslovak")]
524+ property czechoslovak : Nil
525+
526+ property diagenesis : Nil
527+
528+ property dihexahedron : Nil
529+
530+ property dopester : Nil
531+
532+ property eumerism : Nil
533+
534+ property flyness : Nil
535+
536+ property fouler : Nil
537+
538+ property laudanosine : Nil
539+
540+ @[JSON::Field(key: "Lingulidae")]
541+ property lingulidae : Nil
542+
543+ property minutary : Nil
544+
545+ property mitra : Nil
546+
547+ property opisthorchiasis : Nil
548+
549+ property pensively : Nil
550+
551+ property pubigerous : Nil
552+
553+ property rebellious : Nil
554+
555+ property recodify : Nil
556+
557+ property unpaced : Nil
558+end
559+
560+class PiaculumClass
561+ include JSON::Serializable
562+
563+ property alada : Int64?
564+
565+ property amphistomous : Int64?
566+
567+ property boysenberry : Int64?
568+
569+ property catharticalness : Float64?
570+
571+ @[JSON::Field(key: "Chirotherium")]
572+ property chirotherium : Int64?
573+
574+ property decardinalize : Int64?
575+
576+ property discouragement : Int64?
577+
578+ property disdiapason : String?
579+
580+ property doitrified : Int64?
581+
582+ property hexaspermous : Int64?
583+
584+ property homocerc : Bool?
585+
586+ property insinking : Int64?
587+
588+ property loathfulness : Int64?
589+
590+ property miasmatical : Int64?
591+
592+ property neurofibril : Int64?
593+
594+ property nonbookish : Nil
595+
596+ property phonendoscope : Int64?
597+
598+ property pilferment : Int64?
599+
600+ property predismissory : Int64?
601+
602+ property preinscription : Int64?
603+
604+ property quotative : Int64?
605+
606+ property sienna : Int64?
607+
608+ property thorax : Int64?
609+
610+ property yachting : Int64?
611+
612+ @[JSON::Field(key: "Zipper")]
613+ property zipper : Int64?
614+end
615+
616+class Pneumocele
617+ include JSON::Serializable
618+
619+ @[JSON::Field(key: "Carbonarism")]
620+ property carbonarism : Nil
621+
622+ property catharticalness : Float64?
623+
624+ @[JSON::Field(key: "Chirotherium")]
625+ property chirotherium : Int64?
626+
627+ property cineolic : Nil
628+
629+ property cobbly : Nil
630+
631+ property conchyliferous : Nil
632+
633+ property congregation : Nil
634+
635+ property disdiapason : String?
636+
637+ property enterotomy : Nil
638+
639+ property entophytal : Nil
640+
641+ property fewtrils : Nil
642+
643+ property herem : Nil
644+
645+ property homocerc : Bool?
646+
647+ @[JSON::Field(key: "Koniga")]
648+ property koniga : Nil
649+
650+ property meticulosity : Nil
651+
652+ @[JSON::Field(key: "Micky")]
653+ property micky : Nil
654+
655+ property mismarriage : Nil
656+
657+ property neurotrophic : Nil
658+
659+ property nonbookish : Nil
660+
661+ property persuasively : Nil
662+
663+ property replaceable : Nil
664+
665+ property silex : Nil
666+
667+ property taillight : Nil
668+
669+ property unjealous : Nil
670+
671+ property visitorial : Nil
672+end
673+
674+class PotwhiskyClass
675+ include JSON::Serializable
676+
677+ property arciform : Nil
678+
679+ property cresolin : Nil
680+
681+ property disheartener : Nil
682+
683+ property disproportionable : Nil
684+
685+ @[JSON::Field(key: "Euchorda")]
686+ property euchorda : Nil
687+
688+ property ferryway : Nil
689+
690+ property filamentiferous : Nil
691+
692+ property flemish : Nil
693+
694+ property forgainst : Nil
695+
696+ property grainering : Nil
697+
698+ property irrevoluble : Nil
699+
700+ property kindredship : Nil
701+
702+ property pinguitudinous : Nil
703+
704+ property simpletonic : Nil
705+
706+ property singsong : Nil
707+
708+ property submergement : Nil
709+
710+ property supraoesophagal : Nil
711+
712+ property thrashel : Nil
713+
714+ property tyremesis : Nil
715+
716+ @[JSON::Field(key: "Yoruba")]
717+ property yoruba : Nil
718+end
719+
720+class PrefreshmanClass
721+ include JSON::Serializable
722+
723+ property azorubine : Nil
724+
725+ property choroiditis : Nil
726+
727+ property coagulatory : Nil
728+
729+ property cyclorama : Nil
730+
731+ @[JSON::Field(key: "Dolphus")]
732+ property dolphus : Nil
733+
734+ property duckhearted : Nil
735+
736+ @[JSON::Field(key: "Ficus")]
737+ property ficus : Nil
738+
739+ @[JSON::Field(key: "Gemaric")]
740+ property gemaric : Nil
741+
742+ property jugation : Nil
743+
744+ property myoliposis : Nil
745+
746+ property nonnomination : Nil
747+
748+ property palay : Nil
749+
750+ property pentactinal : Nil
751+
752+ @[JSON::Field(key: "Phaet")]
753+ property phaet : Nil
754+
755+ property piquant : Nil
756+
757+ property registration : Nil
758+
759+ property remancipation : Nil
760+
761+ property scutatiform : Nil
762+
763+ property theodolite : Nil
764+
765+ property underward : Nil
766+end
767+
768+alias JurorElement = JurorClass | Bool
769+
770+alias Kongoni = Array(Int64) | Hash(String, Int64)
771+
772+alias LadronismElement = Float64 | LadronismClass | String
773+
774+alias LandlubberlyElement = Int64 | LandlubberlyClass | Bool
775+
776+alias Listener = Int64 | Array(Nil)
777+
778+alias LupusElement = Int64 | LupusClass
779+
780+alias MonaziteElement = Float64 | MonaziteClass
781+
782+alias Monoliteral = Array(Nil) | Bool
783+
784+alias MonotheisticallyElement = MonotheisticallyClass | Array(Nil)
785+
786+alias Montage = Float64 | Array(Nil) | String
787+
788+alias Moralness = Float64 | Array(Nil)
789+
790+alias Mulishly = Float64 | Array(Int64)
791+
792+alias Myoscope = Int64 | Array(Nil) | Bool
793+
794+alias Neuromastic = Float64 | Array(Nil)
795+
796+alias Nonnervous = Int64 | Bool
797+
798+alias Nonvaluation = Float64 | Array(Nil) | Bool
799+
800+alias OccupationalistElement = Array(Nil) | OccupationalistClass
801+
802+alias OutrivalElement = Float64 | OutrivalClass
803+
804+alias Paleographically = Float64 | Hash(String, Int64?)
805+
806+alias Pamphletwise = Int64 | Hash(String, Int64) | String
807+
808+alias Pediatric = Float64 | Bool
809+
810+alias PiaculumElement = Float64 | PiaculumClass
811+
812+alias Piccadilly = Float64 | String
813+
814+alias Piffler = MonaziteClass | Array(Nil)
815+
816+alias Pithful = Int64 | Bool
817+
818+alias Placuntiti = Int64 | Hash(String, Int64)
819+
820+alias Plectopterous = Float64 | Hash(String, Int64)
821+
822+alias Poliorcetic = MonaziteClass | Bool
823+
824+alias Poormaster = Array(Int64) | Hash(String, Int64)
825+
826+alias PotwhiskyElement = Int64 | PotwhiskyClass
827+
828+alias Practicalizer = MonaziteClass | Array(Nil) | String
829+
830+alias PrefreshmanElement = Array(Nil) | PrefreshmanClass | String
831+
832+alias Prehensility = MonaziteClass | Array(Nil) | Bool
833+
834+alias Prevoidance = Int64 | Array(Int64) | MonaziteClass
835+
836+alias Protext = Array(Int64) | MonaziteClass | Bool
Test case

test/inputs/json/priority/combinations4.json

1 generated file · +964 −0
Acrystaldefault / TopLevel.cr+964 −0
@@ -0,0 +1,964 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property protrusive : Array(Protrusive)
7+
8+ property pulpitism : Array(PulpitismElement)
9+
10+ property pyodermia : Array(PyodermiaElement)
11+
12+ property quebrachine : Array(QuebrachineElement?)
13+
14+ property querier : Array(Querier)
15+
16+ property rebarbative : Array(Rebarbative)
17+
18+ property reimagine : Array(Reimagine)
19+
20+ property ressaut : Ressaut
21+
22+ property retrocervical : Array(Retrocervical)
23+
24+ property revert : Array(Revert)
25+
26+ property rewrite : Array(RewriteElement)
27+
28+ property saccoderm : Array(Saccoderm?)
29+
30+ property santir : Array(SantirElement)
31+
32+ property saprophilous : Array(Saprophilous?)
33+
34+ property saxten : Array(SaxtenElement)
35+
36+ property scatty : Array(Scatty?)
37+
38+ property scoffer : Array(Scoffer?)
39+
40+ property scrampum : Array(Scrampum?)
41+
42+ property semantic : Float64
43+
44+ property serpentinic : Array(Serpentinic)
45+
46+ property shadowable : Array(Shadowable)
47+
48+ property sistering : Array(SisteringElement)
49+
50+ property staghunting : Array(Staghunting)
51+
52+ property stagmometer : Array(Stagmometer)
53+
54+ property stimulability : Array(Stimulability)
55+
56+ property strangleable : Array(Strangleable)
57+
58+ property strenuosity : Array(StrenuosityElement)
59+
60+ property tabaxir : Array(Tabaxir)
61+
62+ property talpiform : Array(Talpiform?)
63+
64+ property thwack : Array(Thwack)
65+
66+ property to : Array(Float64?)
67+
68+ property tortricine : Array(Tortricine)
69+
70+ property truantcy : Array(TruantcyElement)
71+
72+ property turgesce : Array(String)
73+
74+ property unbeginning : Array(Unbeginning)
75+
76+ property underdunged : Array(Float64)
77+
78+ property undesirability : Array(Undesirability)
79+
80+ property unerasing : Array(Unerasing)
81+
82+ property unguentarium : Array(Unguentarium?)
83+
84+ property unimpeachably : Array(UnimpeachablyElement)
85+
86+ property unmortgaged : Array(Unmortgaged?)
87+
88+ property unobstructed : Array(Unobstructed?)
89+
90+ property unreceptivity : Array(Unreceptivity)
91+
92+ property unsatisfactoriness : Array(Unsatisfactoriness)
93+
94+ property unsecurity : Array(Int64)
95+
96+ property unstressed : Array(UnstressedElement)
97+
98+ property untasked : Array(Untasked)
99+
100+ property unvarying : Array(Unvarying)
101+
102+ property vehemently : Array(Vehemently?)
103+
104+ property warriorship : Hash(String, Bool)
105+
106+ property whitepot : Array(Whitepot)
107+
108+ property wrothy : Array(WrothyElement)
109+end
110+
111+class PulpitismClass
112+ include JSON::Serializable
113+
114+ property abnet : Nil
115+
116+ property buckhorn : Nil
117+
118+ property calciform : Nil
119+
120+ property chelophore : Nil
121+
122+ property cogitation : Nil
123+
124+ property decreeable : Nil
125+
126+ property despicable : Nil
127+
128+ property isodiazo : Nil
129+
130+ property jadedly : Nil
131+
132+ property leptochlorite : Nil
133+
134+ property nursling : Nil
135+
136+ property palamedean : Nil
137+
138+ property photoheliograph : Nil
139+
140+ property pipewood : Nil
141+
142+ property roberd : Nil
143+
144+ property statable : Nil
145+
146+ property superassume : Nil
147+
148+ property syllabe : Nil
149+
150+ property toughhead : Nil
151+
152+ property underburn : Nil
153+end
154+
155+class PyodermiaClass
156+ include JSON::Serializable
157+
158+ property aphoristically : Nil
159+
160+ property apophyllous : Nil
161+
162+ property cognize : Nil
163+
164+ property dermonosology : Nil
165+
166+ @[JSON::Field(key: "Gyppo")]
167+ property gyppo : Nil
168+
169+ property ither : Nil
170+
171+ property juglandaceous : Nil
172+
173+ property litho : Nil
174+
175+ property macropterous : Nil
176+
177+ property photographer : Nil
178+
179+ property romancing : Nil
180+
181+ property rumness : Nil
182+
183+ property somniloquist : Nil
184+
185+ property stressfully : Nil
186+
187+ property tactically : Nil
188+
189+ property tracheophony : Nil
190+
191+ property unappositely : Nil
192+
193+ property unclothedly : Nil
194+
195+ property unimplied : Nil
196+
197+ property unsyncopated : Nil
198+end
199+
200+class QuebrachineClass
201+ include JSON::Serializable
202+
203+ property catharticalness : Float64
204+
205+ @[JSON::Field(key: "Chirotherium")]
206+ property chirotherium : Int64
207+
208+ property disdiapason : String
209+
210+ property homocerc : Bool
211+
212+ property nonbookish : Nil
213+end
214+
215+class Reimagine
216+ include JSON::Serializable
217+
218+ property adducible : Nil
219+
220+ property anabolin : Nil
221+
222+ property brainy : Nil
223+
224+ property catharticalness : Float64?
225+
226+ @[JSON::Field(key: "Chirotherium")]
227+ property chirotherium : Int64?
228+
229+ property chrysamine : Nil
230+
231+ property disdiapason : String?
232+
233+ property fluxweed : Nil
234+
235+ property glaucine : Nil
236+
237+ property grobianism : Nil
238+
239+ @[JSON::Field(key: "Hermo")]
240+ property hermo : Nil
241+
242+ property hieroglyphist : Nil
243+
244+ property homocerc : Bool?
245+
246+ property icteroid : Nil
247+
248+ property immortal : Nil
249+
250+ property impetulant : Nil
251+
252+ property irrigate : Nil
253+
254+ property myxedema : Nil
255+
256+ property nonbookish : Nil
257+
258+ property onyx : Nil
259+
260+ property repasser : Nil
261+
262+ property septomarginal : Nil
263+
264+ property subdie : Nil
265+
266+ property tibiometatarsal : Nil
267+
268+ property waltzlike : Nil
269+end
270+
271+class Ressaut
272+ include JSON::Serializable
273+
274+ property apperceptive : String
275+
276+ property cuttoo : String
277+
278+ property douser : String
279+
280+ property drinkproof : String
281+
282+ property forementioned : String
283+
284+ @[JSON::Field(key: "Freesia")]
285+ property freesia : String
286+
287+ @[JSON::Field(key: "Genevieve")]
288+ property genevieve : String
289+
290+ property hyperdiabolical : String
291+
292+ property hypocone : String
293+
294+ property irreverentially : String
295+
296+ property jumart : String
297+
298+ @[JSON::Field(key: "Mimosaceae")]
299+ property mimosaceae : String
300+
301+ property mollicrush : String
302+
303+ property nedder : String
304+
305+ property retinasphalt : String
306+
307+ property sough : String
308+
309+ property steading : String
310+
311+ @[JSON::Field(key: "Theopaschitism")]
312+ property theopaschitism : String
313+
314+ property undurableness : String
315+
316+ property unmingleable : String
317+end
318+
319+class RewriteClass
320+ include JSON::Serializable
321+
322+ property accountancy : Nil
323+
324+ property cacotrophic : Nil
325+
326+ property contest : Nil
327+
328+ property couthily : Nil
329+
330+ property falculate : Nil
331+
332+ property foreseize : Nil
333+
334+ @[JSON::Field(key: "Hyades")]
335+ property hyades : Nil
336+
337+ property lemnad : Nil
338+
339+ property monotheistically : Nil
340+
341+ property nonflying : Nil
342+
343+ @[JSON::Field(key: "Ptenoglossa")]
344+ property ptenoglossa : Nil
345+
346+ property repatch : Nil
347+
348+ property rodman : Nil
349+
350+ property strung : Nil
351+
352+ property titmal : Nil
353+
354+ property twalpennyworth : Nil
355+
356+ property unblamable : Nil
357+
358+ property vertical : Nil
359+
360+ @[JSON::Field(key: "Whiggification")]
361+ property whiggification : Nil
362+
363+ property yardman : Nil
364+end
365+
366+class SantirClass
367+ include JSON::Serializable
368+
369+ property admiredly : Nil
370+
371+ property demicaponier : Nil
372+
373+ property epitympanic : Nil
374+
375+ property investitor : Nil
376+
377+ property lupiform : Nil
378+
379+ property monoflagellate : Nil
380+
381+ property paleoethnic : Nil
382+
383+ property prediscountable : Nil
384+
385+ property rhetoricals : Nil
386+
387+ property roomth : Nil
388+
389+ property saccharose : Nil
390+
391+ property septonasal : Nil
392+
393+ property serpenticide : Nil
394+
395+ property setarious : Nil
396+
397+ property spaework : Nil
398+
399+ property stylite : Nil
400+
401+ @[JSON::Field(key: "Suessiones")]
402+ property suessiones : Nil
403+
404+ property timelily : Nil
405+
406+ property unprofaned : Nil
407+
408+ property vorticular : Nil
409+end
410+
411+class SaxtenClass
412+ include JSON::Serializable
413+
414+ property algarrobilla : Nil
415+
416+ property bowgrace : Nil
417+
418+ property catharticalness : Float64?
419+
420+ @[JSON::Field(key: "Centaurid")]
421+ property centaurid : Nil
422+
423+ @[JSON::Field(key: "Chirotherium")]
424+ property chirotherium : Int64?
425+
426+ property disdiapason : String?
427+
428+ property flix : Nil
429+
430+ property germanely : Nil
431+
432+ property homocerc : Bool?
433+
434+ property inhume : Nil
435+
436+ property lepidote : Nil
437+
438+ property megalochirous : Nil
439+
440+ property ninepenny : Nil
441+
442+ property nonbookish : Nil
443+
444+ property nondeist : Nil
445+
446+ property nymphaeaceous : Nil
447+
448+ property parietofrontal : Nil
449+
450+ property sancyite : Nil
451+
452+ property subjectivist : Nil
453+
454+ property tibiad : Nil
455+
456+ property transonic : Nil
457+
458+ property tripetalous : Nil
459+
460+ property trunchman : Nil
461+
462+ property urger : Nil
463+
464+ property withdrawnness : Nil
465+end
466+
467+class Scatty
468+ include JSON::Serializable
469+
470+ property aeriferous : Nil
471+
472+ property antical : Nil
473+
474+ property antighostism : Nil
475+
476+ property arcanum : Nil
477+
478+ property autotrophy : Nil
479+
480+ property baronial : Nil
481+
482+ property caffeine : Nil
483+
484+ property gorgoniacean : Nil
485+
486+ property heroical : Nil
487+
488+ property hydropical : Nil
489+
490+ property mechanology : Nil
491+
492+ property musicopoetic : Nil
493+
494+ property officiality : Nil
495+
496+ property oftentimes : Nil
497+
498+ property ophthalmotonometer : Nil
499+
500+ property reflectively : Nil
501+
502+ property springer : Nil
503+
504+ @[JSON::Field(key: "Tabasco")]
505+ property tabasco : Nil
506+
507+ property teleianthous : Nil
508+
509+ property uncombated : Nil
510+end
511+
512+class SisteringClass
513+ include JSON::Serializable
514+
515+ property amphicarpic : Nil
516+
517+ @[JSON::Field(key: "Chianti")]
518+ property chianti : Nil
519+
520+ property frigorific : Nil
521+
522+ @[JSON::Field(key: "Haplomi")]
523+ property haplomi : Nil
524+
525+ property hyperkinesis : Nil
526+
527+ property laudable : Nil
528+
529+ property madwoman : Nil
530+
531+ property maimedly : Nil
532+
533+ @[JSON::Field(key: "Micropterygidae")]
534+ property micropterygidae : Nil
535+
536+ property microrhabdus : Nil
537+
538+ property nondense : Nil
539+
540+ property phlebemphraxis : Nil
541+
542+ property redsear : Nil
543+
544+ property schismatical : Nil
545+
546+ property tartryl : Nil
547+
548+ property unabhorred : Nil
549+
550+ property undeliberateness : Nil
551+
552+ property unmixable : Nil
553+
554+ property untruckling : Nil
555+
556+ property vineal : Nil
557+end
558+
559+class Staghunting
560+ include JSON::Serializable
561+
562+ property calorimetric : Int64?
563+
564+ property canid : Int64?
565+
566+ property catharticalness : Float64?
567+
568+ @[JSON::Field(key: "Chirotherium")]
569+ property chirotherium : Int64?
570+
571+ property disdiapason : String?
572+
573+ property ditriglyphic : Int64?
574+
575+ property floriferousness : Int64?
576+
577+ property gamelike : Int64?
578+
579+ property grig : Int64?
580+
581+ property homocerc : Bool?
582+
583+ property interloan : Int64?
584+
585+ property lithotomy : Int64?
586+
587+ property loric : Int64?
588+
589+ property membranocoriaceous : Int64?
590+
591+ property membranogenic : Int64?
592+
593+ property nonbookish : Nil
594+
595+ property overtrump : Int64?
596+
597+ property scotino : Int64?
598+
599+ property seasonable : Int64?
600+
601+ property sephen : Int64?
602+
603+ property stigmarioid : Int64?
604+
605+ property tired : Int64?
606+
607+ property trifid : Int64?
608+
609+ property undefeatedly : Int64?
610+
611+ property ungirlish : Int64?
612+end
613+
614+class StrenuosityClass
615+ include JSON::Serializable
616+
617+ property bliss : Int64?
618+
619+ property buccate : Int64?
620+
621+ property bulletproof : Int64?
622+
623+ property catharticalness : Float64?
624+
625+ @[JSON::Field(key: "Chirotherium")]
626+ property chirotherium : Int64?
627+
628+ property crumblingness : Int64?
629+
630+ property disdiapason : String?
631+
632+ property engagedly : Int64?
633+
634+ property fightable : Int64?
635+
636+ property hoariness : Int64?
637+
638+ property homocerc : Bool?
639+
640+ property hypopodium : Int64?
641+
642+ property luxurist : Int64?
643+
644+ property mechanician : Int64?
645+
646+ property nonbookish : Nil
647+
648+ @[JSON::Field(key: "Onopordon")]
649+ property onopordon : Int64?
650+
651+ property podgily : Int64?
652+
653+ property reformableness : Int64?
654+
655+ property scatterbrains : Int64?
656+
657+ property seminuria : Int64?
658+
659+ @[JSON::Field(key: "Sodomite")]
660+ property sodomite : Int64?
661+
662+ property tramp : Int64?
663+
664+ property undueness : Int64?
665+
666+ property worthily : Int64?
667+
668+ @[JSON::Field(key: "Yankeeist")]
669+ property yankeeist : Int64?
670+end
671+
672+class TruantcyClass
673+ include JSON::Serializable
674+
675+ property alfiona : Nil
676+
677+ property ascaridiasis : Nil
678+
679+ property bungey : Nil
680+
681+ property catharticalness : Float64?
682+
683+ property ceroxyle : Nil
684+
685+ @[JSON::Field(key: "Chirotherium")]
686+ property chirotherium : Int64?
687+
688+ property chorology : Nil
689+
690+ property disdiapason : String?
691+
692+ property enmarble : Nil
693+
694+ @[JSON::Field(key: "Epeira")]
695+ property epeira : Nil
696+
697+ @[JSON::Field(key: "Eurylaimi")]
698+ property eurylaimi : Nil
699+
700+ property germination : Nil
701+
702+ property hallelujah : Nil
703+
704+ property homocerc : Bool?
705+
706+ property lev : Nil
707+
708+ property mouthing : Nil
709+
710+ property nonbookish : Nil
711+
712+ property philliloo : Nil
713+
714+ property planetal : Nil
715+
716+ property poney : Nil
717+
718+ property punctualist : Nil
719+
720+ property returnlessly : Nil
721+
722+ property skelder : Nil
723+
724+ property windwaywardly : Nil
725+
726+ @[JSON::Field(key: "Yuman")]
727+ property yuman : Nil
728+end
729+
730+class UnimpeachablyClass
731+ include JSON::Serializable
732+
733+ property acerin : Int64?
734+
735+ @[JSON::Field(key: "Bobadil")]
736+ property bobadil : Int64?
737+
738+ property catharticalness : Float64?
739+
740+ @[JSON::Field(key: "Chirotherium")]
741+ property chirotherium : Int64?
742+
743+ property chlorophylligenous : Int64?
744+
745+ property conversational : Int64?
746+
747+ property demiowl : Int64?
748+
749+ property disdiapason : String?
750+
751+ property ectorhinal : Int64?
752+
753+ property gamblesomeness : Int64?
754+
755+ property homocerc : Bool?
756+
757+ property irrorate : Int64?
758+
759+ property kindergartening : Int64?
760+
761+ property lateritic : Int64?
762+
763+ property mespil : Int64?
764+
765+ property misconfiguration : Int64?
766+
767+ property nonbookish : Nil
768+
769+ property planometry : Int64?
770+
771+ @[JSON::Field(key: "Quiina")]
772+ property quiina : Int64?
773+
774+ @[JSON::Field(key: "Robert")]
775+ property robert : Int64?
776+
777+ property rot : Int64?
778+
779+ property subcinctorium : Int64?
780+
781+ property tussocker : Int64?
782+
783+ property ultraproud : Int64?
784+
785+ property unsuggestedness : Int64?
786+end
787+
788+class UnstressedClass
789+ include JSON::Serializable
790+
791+ @[JSON::Field(key: "Alain")]
792+ property alain : Nil
793+
794+ @[JSON::Field(key: "Amphirhina")]
795+ property amphirhina : Nil
796+
797+ property antimachinery : Nil
798+
799+ property coldish : Nil
800+
801+ property crantara : Nil
802+
803+ property distinguishing : Nil
804+
805+ property elytroposis : Nil
806+
807+ property gentianwort : Nil
808+
809+ property heliosis : Nil
810+
811+ property instrumental : Nil
812+
813+ property introinflection : Nil
814+
815+ property kala : Nil
816+
817+ @[JSON::Field(key: "Lincolnian")]
818+ property lincolnian : Nil
819+
820+ property metad : Nil
821+
822+ @[JSON::Field(key: "Sarcophilus")]
823+ property sarcophilus : Nil
824+
825+ property swingingly : Nil
826+
827+ property unconformity : Nil
828+
829+ property undecreed : Nil
830+
831+ property venerable : Nil
832+
833+ property vowellessness : Nil
834+end
835+
836+class WrothyClass
837+ include JSON::Serializable
838+
839+ @[JSON::Field(key: "Aeschynanthus")]
840+ property aeschynanthus : Nil
841+
842+ property aquiferous : Nil
843+
844+ property cheapener : Nil
845+
846+ property enumeration : Nil
847+
848+ @[JSON::Field(key: "Ephesine")]
849+ property ephesine : Nil
850+
851+ property escadrille : Nil
852+
853+ property estrous : Nil
854+
855+ property interestedly : Nil
856+
857+ property katakinetomer : Nil
858+
859+ property mortification : Nil
860+
861+ property morula : Nil
862+
863+ property orthosymmetrical : Nil
864+
865+ property overbark : Nil
866+
867+ property politist : Nil
868+
869+ property qualified : Nil
870+
871+ property sphenomalar : Nil
872+
873+ property throatful : Nil
874+
875+ property transhumance : Nil
876+
877+ property triandrian : Nil
878+
879+ property unbooked : Nil
880+end
881+
882+alias Protrusive = Float64 | Array(Int64?)
883+
884+alias PulpitismElement = Float64 | Array(Int64) | PulpitismClass
885+
886+alias PyodermiaElement = Int64 | PyodermiaClass
887+
888+alias QuebrachineElement = Bool | QuebrachineClass
889+
890+alias Querier = Hash(String, Int64) | Bool
891+
892+alias Rebarbative = Float64 | Array(Int64) | Bool
893+
894+alias Retrocervical = Int64 | Array(Int64?)
895+
896+alias Revert = Bool | String
897+
898+alias RewriteElement = Float64 | Array(Nil) | RewriteClass
899+
900+alias Saccoderm = Array(Int64) | String
901+
902+alias SantirElement = Float64 | SantirClass
903+
904+alias Saprophilous = Hash(String, Int64) | String
905+
906+alias SaxtenElement = String | SaxtenClass
907+
908+alias Scoffer = Hash(String, Int64) | Array(Nil)
909+
910+alias Scrampum = Array(Int64) | Bool
911+
912+alias Serpentinic = Float64 | Array(Int64)
913+
914+alias Shadowable = Bool | Array(Int64?)
915+
916+alias SisteringElement = Int64 | Array(Nil) | SisteringClass
917+
918+alias Stagmometer = String | Array(Int64?)
919+
920+alias Stimulability = Int64 | Hash(String, Int64) | Bool
921+
922+alias Strangleable = Float64 | Array(Nil)
923+
924+alias StrenuosityElement = Array(Nil) | StrenuosityClass
925+
926+alias Tabaxir = Float64 | Bool
927+
928+alias Talpiform = Float64 | QuebrachineClass
929+
930+alias Thwack = Float64 | Bool | QuebrachineClass
931+
932+alias Tortricine = QuebrachineClass | Array(Int64?)
933+
934+alias TruantcyElement = Bool | TruantcyClass
935+
936+alias Unbeginning = Hash(String, Int64) | Array(Nil) | String
937+
938+alias Undesirability = Array(Int64) | Hash(String, Int64) | String
939+
940+alias Unerasing = Int64 | Hash(String, Int64) | Array(Nil)
941+
942+alias Unguentarium = Int64 | Array(Nil)
943+
944+alias UnimpeachablyElement = Bool | UnimpeachablyClass
945+
946+alias Unmortgaged = Float64 | Hash(String, Int64)
947+
948+alias Unobstructed = Int64 | QuebrachineClass
949+
950+alias Unreceptivity = Int64 | Array(Nil) | String
951+
952+alias Unsatisfactoriness = Int64 | Array(Int64) | Bool
953+
954+alias UnstressedElement = Bool | String | UnstressedClass
955+
956+alias Untasked = Float64 | Hash(String, Int64) | Array(Nil)
957+
958+alias Unvarying = Float64 | Hash(String, Int64) | Bool
959+
960+alias Vehemently = Array(Nil) | Bool
961+
962+alias Whitepot = Float64 | QuebrachineClass
963+
964+alias WrothyElement = Array(Nil) | WrothyClass
Test case

test/inputs/json/priority/combined-enum.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property bar : Array(Bar)
7+
8+ property foo : Array(Bar)
9+end
10+
11+class Bar
12+ include JSON::Serializable
13+
14+ property x : String
15+end
Test case

test/inputs/json/priority/direct-recursive.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property also : TopLevel?
7+
8+ property bar : Bool
9+
10+ property foo : Int64
11+
12+ property moo : Float64
13+
14+ property quux : String
15+end
Test case

test/inputs/json/priority/empty-enum.json

1 generated file · +13 −0
Acrystaldefault / TopLevel.cr+13 −0
@@ -0,0 +1,13 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : Array(Foo)
7+end
8+
9+class Foo
10+ include JSON::Serializable
11+
12+ property bar : String?
13+end
Test case

test/inputs/json/priority/issue2680-object-array.json

1 generated file · +9 −0
Acrystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property key : String
9+end
Test case

test/inputs/json/priority/issue2680-scalar-array.json

1 generated file · +3 −0
Acrystaldefault / TopLevel.cr+3 −0
@@ -0,0 +1,3 @@
1+require "json"
2+
3+alias TopLevel = Array(Int64)
Test case

test/inputs/json/priority/keywords.json

1 generated file · +2,402 −0
Acrystaldefault / TopLevel.cr+2,402 −0
@@ -0,0 +1,2402 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property dummy : Int64
7+
8+ property obj1 : Obj1
9+
10+ property obj2 : Obj2
11+
12+ property obj3 : Obj3
13+
14+ property obj4 : Obj4
15+
16+ property obj5 : Obj5
17+end
18+
19+class Obj1
20+ include JSON::Serializable
21+
22+ property alignas : Alignas
23+
24+ property alignof : Alignof
25+
26+ property and : And
27+
28+ property and_eq : AndEq
29+
30+ @[JSON::Field(key: "Any")]
31+ property any : AnyClass
32+
33+ property array : ArrayClass
34+
35+ property assert : Assert
36+
37+ property associatedtype : Associatedtype
38+
39+ property associativity : Associativity
40+
41+ property async : Async
42+
43+ property atomic : AtomicClass
44+
45+ property atomic_cancel : AtomicCancel
46+
47+ property atomic_commit : AtomicCommit
48+
49+ property atomic_noexcept : AtomicNoexcept
50+
51+ property auto : Auto
52+
53+ property await : Await
54+
55+ property base : Base
56+
57+ property bitand : Bitand
58+
59+ property bitor : Bitor
60+
61+ @[JSON::Field(key: "BOOL")]
62+ property bool : BoolClass
63+
64+ property boolean : Boolean
65+
66+ property bycopy : Bycopy
67+
68+ property byref : Byref
69+
70+ property byte : Byte
71+
72+ property catch : Catch
73+
74+ property chan : Chan
75+
76+ property char : CharClass
77+
78+ property char16_t : Char16T
79+
80+ property char32_t : Char32T
81+
82+ property checked : Checked
83+
84+ property clone : Clone
85+
86+ property co_await : CoAwait
87+
88+ property co_return : CoReturn
89+
90+ property co_yield : CoYield
91+
92+ property compl : Compl
93+
94+ @[JSON::Field(key: "_Complex")]
95+ property complex : Complex
96+
97+ property concept : Concept
98+
99+ property console : Console
100+
101+ property const : Const
102+
103+ property const_cast : ConstCast
104+
105+ property constexpr : Constexpr
106+
107+ property constructor : Constructor
108+
109+ property continue : Continue
110+
111+ property convenience : Convenience
112+
113+ property convert : Convert
114+
115+ property converter : Converter
116+
117+ property date : Date
118+
119+ property date_parse_handling : DateParseHandling
120+
121+ property debugger : Debugger
122+
123+ property decimal : Decimal
124+
125+ property declare : Declare
126+
127+ property decltype : Decltype
128+
129+ property decode_string : DecodeString
130+
131+ property dummy : Int64
132+
133+ @[JSON::Field(key: "_")]
134+ property empty : Empty
135+
136+ @[JSON::Field(key: "_Imaginery")]
137+ property imaginery : Imaginery
138+
139+ @[JSON::Field(key: "abstract")]
140+ property obj1_abstract : Abstract
141+
142+ @[JSON::Field(key: "any")]
143+ property obj1_any : Obj1Any
144+
145+ @[JSON::Field(key: "as")]
146+ property obj1_as : As
147+
148+ @[JSON::Field(key: "asm")]
149+ property obj1_asm : Asm
150+
151+ @[JSON::Field(key: "_Bool")]
152+ property obj1_bool : Obj1Bool
153+
154+ @[JSON::Field(key: "break")]
155+ property obj1_break : Break
156+
157+ @[JSON::Field(key: "case")]
158+ property obj1_case : Case
159+
160+ @[JSON::Field(key: "Class")]
161+ property obj1_class : ClassClass
162+
163+ @[JSON::Field(key: "bool")]
164+ property purple_bool : Obj1BoolClass
165+
166+ @[JSON::Field(key: "class")]
167+ property purple_class : Obj1Class
168+end
169+
170+class Alignas
171+ include JSON::Serializable
172+
173+ property alignas : Int64
174+end
175+
176+class Alignof
177+ include JSON::Serializable
178+
179+ property alignof : Int64
180+end
181+
182+class And
183+ include JSON::Serializable
184+
185+ property and : Int64
186+end
187+
188+class AndEq
189+ include JSON::Serializable
190+
191+ property and_eq : Int64
192+end
193+
194+class AnyClass
195+ include JSON::Serializable
196+
197+ @[JSON::Field(key: "Any")]
198+ property any : Int64
199+end
200+
201+class ArrayClass
202+ include JSON::Serializable
203+
204+ property array : Int64
205+end
206+
207+class Assert
208+ include JSON::Serializable
209+
210+ property assert : Int64
211+end
212+
213+class Associatedtype
214+ include JSON::Serializable
215+
216+ property associatedtype : Int64
217+end
218+
219+class Associativity
220+ include JSON::Serializable
221+
222+ property associativity : Int64
223+end
224+
225+class Async
226+ include JSON::Serializable
227+
228+ property async : Int64
229+end
230+
231+class AtomicClass
232+ include JSON::Serializable
233+
234+ property atomic : Int64
235+end
236+
237+class AtomicCancel
238+ include JSON::Serializable
239+
240+ property atomic_cancel : Int64
241+end
242+
243+class AtomicCommit
244+ include JSON::Serializable
245+
246+ property atomic_commit : Int64
247+end
248+
249+class AtomicNoexcept
250+ include JSON::Serializable
251+
252+ property atomic_noexcept : Int64
253+end
254+
255+class Auto
256+ include JSON::Serializable
257+
258+ property auto : Int64
259+end
260+
261+class Await
262+ include JSON::Serializable
263+
264+ property await : Int64
265+end
266+
267+class Base
268+ include JSON::Serializable
269+
270+ property base : Int64
271+end
272+
273+class Bitand
274+ include JSON::Serializable
275+
276+ property bitand : Int64
277+end
278+
279+class Bitor
280+ include JSON::Serializable
281+
282+ property bitor : Int64
283+end
284+
285+class BoolClass
286+ include JSON::Serializable
287+
288+ @[JSON::Field(key: "BOOL")]
289+ property bool : Int64
290+end
291+
292+class Boolean
293+ include JSON::Serializable
294+
295+ property boolean : Int64
296+end
297+
298+class Bycopy
299+ include JSON::Serializable
300+
301+ property bycopy : Int64
302+end
303+
304+class Byref
305+ include JSON::Serializable
306+
307+ property byref : Int64
308+end
309+
310+class Byte
311+ include JSON::Serializable
312+
313+ property byte : Int64
314+end
315+
316+class Catch
317+ include JSON::Serializable
318+
319+ property catch : Int64
320+end
321+
322+class Chan
323+ include JSON::Serializable
324+
325+ property chan : Int64
326+end
327+
328+class CharClass
329+ include JSON::Serializable
330+
331+ property char : Int64
332+end
333+
334+class Char16T
335+ include JSON::Serializable
336+
337+ property char16_t : Int64
338+end
339+
340+class Char32T
341+ include JSON::Serializable
342+
343+ property char32_t : Int64
344+end
345+
346+class Checked
347+ include JSON::Serializable
348+
349+ property checked : Int64
350+end
351+
352+class Clone
353+ include JSON::Serializable
354+
355+ property clone : Int64
356+end
357+
358+class CoAwait
359+ include JSON::Serializable
360+
361+ property co_await : Int64
362+end
363+
364+class CoReturn
365+ include JSON::Serializable
366+
367+ property co_return : Int64
368+end
369+
370+class CoYield
371+ include JSON::Serializable
372+
373+ property co_yield : Int64
374+end
375+
376+class Compl
377+ include JSON::Serializable
378+
379+ property compl : Int64
380+end
381+
382+class Complex
383+ include JSON::Serializable
384+
385+ @[JSON::Field(key: "_Complex")]
386+ property complex : Int64
387+end
388+
389+class Concept
390+ include JSON::Serializable
391+
392+ property concept : Int64
393+end
394+
395+class Console
396+ include JSON::Serializable
397+
398+ property console : Int64
399+end
400+
401+class Const
402+ include JSON::Serializable
403+
404+ property const : Int64
405+end
406+
407+class ConstCast
408+ include JSON::Serializable
409+
410+ property const_cast : Int64
411+end
412+
413+class Constexpr
414+ include JSON::Serializable
415+
416+ property constexpr : Int64
417+end
418+
419+class Constructor
420+ include JSON::Serializable
421+
422+ property constructor : Int64
423+end
424+
425+class Continue
426+ include JSON::Serializable
427+
428+ property continue : Int64
429+end
430+
431+class Convenience
432+ include JSON::Serializable
433+
434+ property convenience : Int64
435+end
436+
437+class Convert
438+ include JSON::Serializable
439+
440+ property convert : Int64
441+end
442+
443+class Converter
444+ include JSON::Serializable
445+
446+ property converter : Int64
447+end
448+
449+class Date
450+ include JSON::Serializable
451+
452+ property date : Int64
453+end
454+
455+class DateParseHandling
456+ include JSON::Serializable
457+
458+ property date_parse_handling : Int64
459+end
460+
461+class Debugger
462+ include JSON::Serializable
463+
464+ property debugger : Int64
465+end
466+
467+class Decimal
468+ include JSON::Serializable
469+
470+ property decimal : Int64
471+end
472+
473+class Declare
474+ include JSON::Serializable
475+
476+ property declare : Int64
477+end
478+
479+class Decltype
480+ include JSON::Serializable
481+
482+ property decltype : Int64
483+end
484+
485+class DecodeString
486+ include JSON::Serializable
487+
488+ property decode_string : Int64
489+end
490+
491+class Empty
492+ include JSON::Serializable
493+
494+ @[JSON::Field(key: "_")]
495+ property empty : Int64
496+end
497+
498+class Imaginery
499+ include JSON::Serializable
500+
501+ @[JSON::Field(key: "_Imaginery")]
502+ property imaginery : Int64
503+end
504+
505+class Abstract
506+ include JSON::Serializable
507+
508+ @[JSON::Field(key: "abstract")]
509+ property abstract_abstract : Int64
510+end
511+
512+class Obj1Any
513+ include JSON::Serializable
514+
515+ property any : Int64
516+end
517+
518+class As
519+ include JSON::Serializable
520+
521+ @[JSON::Field(key: "as")]
522+ property as_as : Int64
523+end
524+
525+class Asm
526+ include JSON::Serializable
527+
528+ @[JSON::Field(key: "asm")]
529+ property asm_asm : Int64
530+end
531+
532+class Obj1Bool
533+ include JSON::Serializable
534+
535+ @[JSON::Field(key: "_Bool")]
536+ property bool : Int64
537+end
538+
539+class Break
540+ include JSON::Serializable
541+
542+ @[JSON::Field(key: "break")]
543+ property break_break : Int64
544+end
545+
546+class Case
547+ include JSON::Serializable
548+
549+ @[JSON::Field(key: "case")]
550+ property case_case : Int64
551+end
552+
553+class ClassClass
554+ include JSON::Serializable
555+
556+ @[JSON::Field(key: "Class")]
557+ property class_class : Int64
558+end
559+
560+class Obj1BoolClass
561+ include JSON::Serializable
562+
563+ property bool : Int64
564+end
565+
566+class Obj1Class
567+ include JSON::Serializable
568+
569+ @[JSON::Field(key: "class")]
570+ property class_class : Int64
571+end
572+
573+class Obj2
574+ include JSON::Serializable
575+
576+ property default : Default
577+
578+ property defer : Defer
579+
580+ property deinit : Deinit
581+
582+ property del : Del
583+
584+ property delegate : Delegate
585+
586+ property delete : Delete
587+
588+ property dict : Dict
589+
590+ property dictionary : Dictionary
591+
592+ @[JSON::Field(key: "didSet")]
593+ property did_set : DidSet
594+
595+ property double : Double
596+
597+ property dummy : Int64
598+
599+ property dynamic : Dynamic
600+
601+ property dynamic_cast : DynamicCast
602+
603+ property elif : Elif
604+
605+ property encode_quick_type : EncodeQuickType
606+
607+ @[JSON::Field(key: "equalityContract")]
608+ property equality_contract : EqualityContract
609+
610+ property event : EventClass
611+
612+ property except : Except
613+
614+ property exception : ExceptionClass
615+
616+ property explicit : Explicit
617+
618+ property export : Export
619+
620+ property exposing : Exposing
621+
622+ property extends : Extends
623+
624+ property extension : Extension
625+
626+ property extern : ExternClass
627+
628+ property fallthrough : Fallthrough
629+
630+ property fileprivate : Fileprivate
631+
632+ property final : Final
633+
634+ property finally : Finally
635+
636+ property fixed : Fixed
637+
638+ property float : FloatClass
639+
640+ property foreach : Foreach
641+
642+ property friend : Friend
643+
644+ property from : From
645+
646+ property from_json : FromJson
647+
648+ property func : Func
649+
650+ property function : Function
651+
652+ property get : Get
653+
654+ property global : Global
655+
656+ property go : Go
657+
658+ property goto : Goto
659+
660+ property guard : Guard
661+
662+ @[JSON::Field(key: "hasOwnProperty")]
663+ property has_own_property : HasOwnProperty
664+
665+ property id : Id
666+
667+ @[JSON::Field(key: "IMP")]
668+ property imp : Imp
669+
670+ property implements : Implements
671+
672+ property implicit : Implicit
673+
674+ property import : Import
675+
676+ property indirect : Indirect
677+
678+ property infix : Infix
679+
680+ property init : Init
681+
682+ property inline : Inline
683+
684+ property inout : Inout
685+
686+ property instanceof : Instanceof
687+
688+ property int : IntClass
689+
690+ property interface : Interface
691+
692+ property internal : Internal
693+
694+ @[JSON::Field(key: "def")]
695+ property obj2_def : Def
696+
697+ @[JSON::Field(key: "do")]
698+ property obj2_do : Do
699+
700+ @[JSON::Field(key: "else")]
701+ property obj2_else : Else
702+
703+ @[JSON::Field(key: "enum")]
704+ property obj2_enum : EnumClass
705+
706+ @[JSON::Field(key: "False")]
707+ property obj2_false : False
708+
709+ @[JSON::Field(key: "for")]
710+ property obj2_for : For
711+
712+ @[JSON::Field(key: "if")]
713+ property obj2_if : If
714+
715+ @[JSON::Field(key: "in")]
716+ property obj2_in : In
717+
718+ @[JSON::Field(key: "false")]
719+ property purple_false : FalseClass
720+end
721+
722+class Default
723+ include JSON::Serializable
724+
725+ property default : Int64
726+end
727+
728+class Defer
729+ include JSON::Serializable
730+
731+ property defer : Int64
732+end
733+
734+class Deinit
735+ include JSON::Serializable
736+
737+ property deinit : Int64
738+end
739+
740+class Del
741+ include JSON::Serializable
742+
743+ property del : Int64
744+end
745+
746+class Delegate
747+ include JSON::Serializable
748+
749+ property delegate : Int64
750+end
751+
752+class Delete
753+ include JSON::Serializable
754+
755+ property delete : Int64
756+end
757+
758+class Dict
759+ include JSON::Serializable
760+
761+ property dict : Int64
762+end
763+
764+class Dictionary
765+ include JSON::Serializable
766+
767+ property dictionary : Int64
768+end
769+
770+class DidSet
771+ include JSON::Serializable
772+
773+ @[JSON::Field(key: "didSet")]
774+ property did_set : Int64
775+end
776+
777+class Double
778+ include JSON::Serializable
779+
780+ property double : Int64
781+end
782+
783+class Dynamic
784+ include JSON::Serializable
785+
786+ property dynamic : Int64
787+end
788+
789+class DynamicCast
790+ include JSON::Serializable
791+
792+ property dynamic_cast : Int64
793+end
794+
795+class Elif
796+ include JSON::Serializable
797+
798+ property elif : Int64
799+end
800+
801+class EncodeQuickType
802+ include JSON::Serializable
803+
804+ property encode_quick_type : Int64
805+end
806+
807+class EqualityContract
808+ include JSON::Serializable
809+
810+ @[JSON::Field(key: "equalityContract")]
811+ property equality_contract : Int64
812+end
813+
814+class EventClass
815+ include JSON::Serializable
816+
817+ property event : Int64
818+end
819+
820+class Except
821+ include JSON::Serializable
822+
823+ property except : Int64
824+end
825+
826+class ExceptionClass
827+ include JSON::Serializable
828+
829+ property exception : Int64
830+end
831+
832+class Explicit
833+ include JSON::Serializable
834+
835+ property explicit : Int64
836+end
837+
838+class Export
839+ include JSON::Serializable
840+
841+ property export : Int64
842+end
843+
844+class Exposing
845+ include JSON::Serializable
846+
847+ property exposing : Int64
848+end
849+
850+class Extends
851+ include JSON::Serializable
852+
853+ property extends : Int64
854+end
855+
856+class Extension
857+ include JSON::Serializable
858+
859+ property extension : Int64
860+end
861+
862+class ExternClass
863+ include JSON::Serializable
864+
865+ property extern : Int64
866+end
867+
868+class Fallthrough
869+ include JSON::Serializable
870+
871+ property fallthrough : Int64
872+end
873+
874+class Fileprivate
875+ include JSON::Serializable
876+
877+ property fileprivate : Int64
878+end
879+
880+class Final
881+ include JSON::Serializable
882+
883+ property final : Int64
884+end
885+
886+class Finally
887+ include JSON::Serializable
888+
889+ property finally : Int64
890+end
891+
892+class Fixed
893+ include JSON::Serializable
894+
895+ property fixed : Int64
896+end
897+
898+class FloatClass
899+ include JSON::Serializable
900+
901+ property float : Int64
902+end
903+
904+class Foreach
905+ include JSON::Serializable
906+
907+ property foreach : Int64
908+end
909+
910+class Friend
911+ include JSON::Serializable
912+
913+ property friend : Int64
914+end
915+
916+class From
917+ include JSON::Serializable
918+
919+ property from : Int64
920+end
921+
922+class FromJson
923+ include JSON::Serializable
924+
925+ property from_json : Int64
926+end
927+
928+class Func
929+ include JSON::Serializable
930+
931+ property func : Int64
932+end
933+
934+class Function
935+ include JSON::Serializable
936+
937+ property function : Int64
938+end
939+
940+class Get
941+ include JSON::Serializable
942+
943+ property get : Int64
944+end
945+
946+class Global
947+ include JSON::Serializable
948+
949+ property global : Int64
950+end
951+
952+class Go
953+ include JSON::Serializable
954+
955+ property go : Int64
956+end
957+
958+class Goto
959+ include JSON::Serializable
960+
961+ property goto : Int64
962+end
963+
964+class Guard
965+ include JSON::Serializable
966+
967+ property guard : Int64
968+end
969+
970+class HasOwnProperty
971+ include JSON::Serializable
972+
973+ @[JSON::Field(key: "hasOwnProperty")]
974+ property has_own_property : Int64
975+end
976+
977+class Id
978+ include JSON::Serializable
979+
980+ property id : Int64
981+end
982+
983+class Imp
984+ include JSON::Serializable
985+
986+ @[JSON::Field(key: "IMP")]
987+ property imp : Int64
988+end
989+
990+class Implements
991+ include JSON::Serializable
992+
993+ property implements : Int64
994+end
995+
996+class Implicit
997+ include JSON::Serializable
998+
999+ property implicit : Int64
1000+end
1001+
1002+class Import
1003+ include JSON::Serializable
1004+
1005+ property import : Int64
1006+end
1007+
1008+class Indirect
1009+ include JSON::Serializable
1010+
1011+ property indirect : Int64
1012+end
1013+
1014+class Infix
1015+ include JSON::Serializable
1016+
1017+ property infix : Int64
1018+end
1019+
1020+class Init
1021+ include JSON::Serializable
1022+
1023+ property init : Int64
1024+end
1025+
1026+class Inline
1027+ include JSON::Serializable
1028+
1029+ property inline : Int64
1030+end
1031+
1032+class Inout
1033+ include JSON::Serializable
1034+
1035+ property inout : Int64
1036+end
1037+
1038+class Instanceof
1039+ include JSON::Serializable
1040+
1041+ property instanceof : Int64
1042+end
1043+
1044+class IntClass
1045+ include JSON::Serializable
1046+
1047+ property int : Int64
1048+end
1049+
1050+class Interface
1051+ include JSON::Serializable
1052+
1053+ property interface : Int64
1054+end
1055+
1056+class Internal
1057+ include JSON::Serializable
1058+
1059+ property internal : Int64
1060+end
1061+
1062+class Def
1063+ include JSON::Serializable
1064+
1065+ @[JSON::Field(key: "def")]
1066+ property def_def : Int64
1067+end
1068+
1069+class Do
1070+ include JSON::Serializable
1071+
1072+ @[JSON::Field(key: "do")]
1073+ property do_do : Int64
1074+end
1075+
1076+class Else
1077+ include JSON::Serializable
1078+
1079+ @[JSON::Field(key: "else")]
1080+ property else_else : Int64
1081+end
1082+
1083+class EnumClass
1084+ include JSON::Serializable
1085+
1086+ @[JSON::Field(key: "enum")]
1087+ property enum_enum : Int64
1088+end
1089+
1090+class False
1091+ include JSON::Serializable
1092+
1093+ @[JSON::Field(key: "False")]
1094+ property false_false : Int64
1095+end
1096+
1097+class For
1098+ include JSON::Serializable
1099+
1100+ @[JSON::Field(key: "for")]
1101+ property for_for : Int64
1102+end
1103+
1104+class If
1105+ include JSON::Serializable
1106+
1107+ @[JSON::Field(key: "if")]
1108+ property if_if : Int64
1109+end
1110+
1111+class In
1112+ include JSON::Serializable
1113+
1114+ @[JSON::Field(key: "in")]
1115+ property in_in : Int64
1116+end
1117+
1118+class FalseClass
1119+ include JSON::Serializable
1120+
1121+ @[JSON::Field(key: "false")]
1122+ property false_false : Int64
1123+end
1124+
1125+class Obj3
1126+ include JSON::Serializable
1127+
1128+ property dummy : Int64
1129+
1130+ property is : Is
1131+
1132+ property iterable : IterableClass
1133+
1134+ property jdec : Jdec
1135+
1136+ property jenc : Jenc
1137+
1138+ property jpipe : Jpipe
1139+
1140+ property json : Json
1141+
1142+ property json_converter : JsonConverter
1143+
1144+ property json_serializer : JsonSerializer
1145+
1146+ property json_token : JsonToken
1147+
1148+ property json_writer : JsonWriter
1149+
1150+ property lambda : Lambda
1151+
1152+ property lazy : Lazy
1153+
1154+ property left : Left
1155+
1156+ property let : Let
1157+
1158+ property list : List
1159+
1160+ property lock : Lock
1161+
1162+ property long : Long
1163+
1164+ property map : Map
1165+
1166+ property metadata_property_handling : MetadataPropertyHandling
1167+
1168+ property mutable : Mutable
1169+
1170+ property mutating : Mutating
1171+
1172+ property namespace : Namespace
1173+
1174+ property native : Native
1175+
1176+ property new : New
1177+
1178+ property newtonsoft : Newtonsoft
1179+
1180+ @[JSON::Field(key: "NO")]
1181+ property no : No
1182+
1183+ property noexcept : Noexcept
1184+
1185+ property nonatomic : Nonatomic
1186+
1187+ @[JSON::Field(key: "None")]
1188+ property none : None
1189+
1190+ property nonlocal : Nonlocal
1191+
1192+ property nonmutating : Nonmutating
1193+
1194+ property not : Not
1195+
1196+ property not_eq : NotEq
1197+
1198+ @[JSON::Field(key: "NSString")]
1199+ property ns_string : NsString
1200+
1201+ @[JSON::Field(key: "NULL")]
1202+ property null : Null
1203+
1204+ property nullptr : Nullptr
1205+
1206+ property number : NumberClass
1207+
1208+ @[JSON::Field(key: "module")]
1209+ property obj3_module : Module
1210+
1211+ @[JSON::Field(key: "nil")]
1212+ property obj3_nil : NilClass
1213+
1214+ @[JSON::Field(key: "none")]
1215+ property obj3_none : NoneClass
1216+
1217+ @[JSON::Field(key: "null")]
1218+ property obj3_null : NullClass
1219+
1220+ @[JSON::Field(key: "of")]
1221+ property obj3_of : Of
1222+
1223+ @[JSON::Field(key: "out")]
1224+ property obj3_out : Out
1225+
1226+ @[JSON::Field(key: "private")]
1227+ property obj3_private : Private
1228+
1229+ @[JSON::Field(key: "protected")]
1230+ property obj3_protected : Protected
1231+
1232+ @[JSON::Field(key: "protocol")]
1233+ property obj3_protocol : ProtocolClass
1234+
1235+ property object : ObjectClass
1236+
1237+ property oneway : Oneway
1238+
1239+ property open : Open
1240+
1241+ property operator : Operator
1242+
1243+ property optional : Optional
1244+
1245+ property or : Or
1246+
1247+ property or_eq : OrEq
1248+
1249+ property override : Override
1250+
1251+ property package : Package
1252+
1253+ property params : Params
1254+
1255+ property pass : Pass
1256+
1257+ property port : Port
1258+
1259+ property postfix : Postfix
1260+
1261+ property precedence : Precedence
1262+
1263+ property prefix : Prefix
1264+
1265+ property print : Print
1266+
1267+ @[JSON::Field(key: "printMembers")]
1268+ property print_members : PrintMembers
1269+
1270+ property printf : Printf
1271+
1272+ @[JSON::Field(key: "Protocol")]
1273+ property protocol : Protocol
1274+end
1275+
1276+class Is
1277+ include JSON::Serializable
1278+
1279+ property is : Int64
1280+end
1281+
1282+class IterableClass
1283+ include JSON::Serializable
1284+
1285+ property iterable : Int64
1286+end
1287+
1288+class Jdec
1289+ include JSON::Serializable
1290+
1291+ property jdec : Int64
1292+end
1293+
1294+class Jenc
1295+ include JSON::Serializable
1296+
1297+ property jenc : Int64
1298+end
1299+
1300+class Jpipe
1301+ include JSON::Serializable
1302+
1303+ property jpipe : Int64
1304+end
1305+
1306+class Json
1307+ include JSON::Serializable
1308+
1309+ property json : Int64
1310+end
1311+
1312+class JsonConverter
1313+ include JSON::Serializable
1314+
1315+ property json_converter : Int64
1316+end
1317+
1318+class JsonSerializer
1319+ include JSON::Serializable
1320+
1321+ property json_serializer : Int64
1322+end
1323+
1324+class JsonToken
1325+ include JSON::Serializable
1326+
1327+ property json_token : Int64
1328+end
1329+
1330+class JsonWriter
1331+ include JSON::Serializable
1332+
1333+ property json_writer : Int64
1334+end
1335+
1336+class Lambda
1337+ include JSON::Serializable
1338+
1339+ property lambda : Int64
1340+end
1341+
1342+class Lazy
1343+ include JSON::Serializable
1344+
1345+ property lazy : Int64
1346+end
1347+
1348+class Left
1349+ include JSON::Serializable
1350+
1351+ property left : Int64
1352+end
1353+
1354+class Let
1355+ include JSON::Serializable
1356+
1357+ property let : Int64
1358+end
1359+
1360+class List
1361+ include JSON::Serializable
1362+
1363+ property list : Int64
1364+end
1365+
1366+class Lock
1367+ include JSON::Serializable
1368+
1369+ property lock : Int64
1370+end
1371+
1372+class Long
1373+ include JSON::Serializable
1374+
1375+ property long : Int64
1376+end
1377+
1378+class Map
1379+ include JSON::Serializable
1380+
1381+ property map : Int64
1382+end
1383+
1384+class MetadataPropertyHandling
1385+ include JSON::Serializable
1386+
1387+ property metadata_property_handling : Int64
1388+end
1389+
1390+class Mutable
1391+ include JSON::Serializable
1392+
1393+ property mutable : Int64
1394+end
1395+
1396+class Mutating
1397+ include JSON::Serializable
1398+
1399+ property mutating : Int64
1400+end
1401+
1402+class Namespace
1403+ include JSON::Serializable
1404+
1405+ property namespace : Int64
1406+end
1407+
1408+class Native
1409+ include JSON::Serializable
1410+
1411+ property native : Int64
1412+end
1413+
1414+class New
1415+ include JSON::Serializable
1416+
1417+ property new : Int64
1418+end
1419+
1420+class Newtonsoft
1421+ include JSON::Serializable
1422+
1423+ property newtonsoft : Int64
1424+end
1425+
1426+class No
1427+ include JSON::Serializable
1428+
1429+ @[JSON::Field(key: "NO")]
1430+ property no : Int64
1431+end
1432+
1433+class Noexcept
1434+ include JSON::Serializable
1435+
1436+ property noexcept : Int64
1437+end
1438+
1439+class Nonatomic
1440+ include JSON::Serializable
1441+
1442+ property nonatomic : Int64
1443+end
1444+
1445+class None
1446+ include JSON::Serializable
1447+
1448+ @[JSON::Field(key: "None")]
1449+ property none : Int64
1450+end
1451+
1452+class Nonlocal
1453+ include JSON::Serializable
1454+
1455+ property nonlocal : Int64
1456+end
1457+
1458+class Nonmutating
1459+ include JSON::Serializable
1460+
1461+ property nonmutating : Int64
1462+end
1463+
1464+class Not
1465+ include JSON::Serializable
1466+
1467+ property not : Int64
1468+end
1469+
1470+class NotEq
1471+ include JSON::Serializable
1472+
1473+ property not_eq : Int64
1474+end
1475+
1476+class NsString
1477+ include JSON::Serializable
1478+
1479+ @[JSON::Field(key: "NSString")]
1480+ property ns_string : Int64
1481+end
1482+
1483+class Null
1484+ include JSON::Serializable
1485+
1486+ @[JSON::Field(key: "NULL")]
1487+ property null : Int64
1488+end
1489+
1490+class Nullptr
1491+ include JSON::Serializable
1492+
1493+ property nullptr : Int64
1494+end
1495+
1496+class NumberClass
1497+ include JSON::Serializable
1498+
1499+ property number : Int64
1500+end
1501+
1502+class Module
1503+ include JSON::Serializable
1504+
1505+ @[JSON::Field(key: "module")]
1506+ property module_module : Int64
1507+end
1508+
1509+class NilClass
1510+ include JSON::Serializable
1511+
1512+ @[JSON::Field(key: "nil")]
1513+ property nil_nil : Int64
1514+end
1515+
1516+class NoneClass
1517+ include JSON::Serializable
1518+
1519+ property none : Int64
1520+end
1521+
1522+class NullClass
1523+ include JSON::Serializable
1524+
1525+ property null : Int64
1526+end
1527+
1528+class Of
1529+ include JSON::Serializable
1530+
1531+ @[JSON::Field(key: "of")]
1532+ property of_of : Int64
1533+end
1534+
1535+class Out
1536+ include JSON::Serializable
1537+
1538+ @[JSON::Field(key: "out")]
1539+ property out_out : Int64
1540+end
1541+
1542+class Private
1543+ include JSON::Serializable
1544+
1545+ @[JSON::Field(key: "private")]
1546+ property private_private : Int64
1547+end
1548+
1549+class Protected
1550+ include JSON::Serializable
1551+
1552+ @[JSON::Field(key: "protected")]
1553+ property protected_protected : Int64
1554+end
1555+
1556+class ProtocolClass
1557+ include JSON::Serializable
1558+
1559+ property protocol : Int64
1560+end
1561+
1562+class ObjectClass
1563+ include JSON::Serializable
1564+
1565+ property object : Int64
1566+end
1567+
1568+class Oneway
1569+ include JSON::Serializable
1570+
1571+ property oneway : Int64
1572+end
1573+
1574+class Open
1575+ include JSON::Serializable
1576+
1577+ property open : Int64
1578+end
1579+
1580+class Operator
1581+ include JSON::Serializable
1582+
1583+ property operator : Int64
1584+end
1585+
1586+class Optional
1587+ include JSON::Serializable
1588+
1589+ property optional : Int64
1590+end
1591+
1592+class Or
1593+ include JSON::Serializable
1594+
1595+ property or : Int64
1596+end
1597+
1598+class OrEq
1599+ include JSON::Serializable
1600+
1601+ property or_eq : Int64
1602+end
1603+
1604+class Override
1605+ include JSON::Serializable
1606+
1607+ property override : Int64
1608+end
1609+
1610+class Package
1611+ include JSON::Serializable
1612+
1613+ property package : Int64
1614+end
1615+
1616+class Params
1617+ include JSON::Serializable
1618+
1619+ property params : Int64
1620+end
1621+
1622+class Pass
1623+ include JSON::Serializable
1624+
1625+ property pass : Int64
1626+end
1627+
1628+class Port
1629+ include JSON::Serializable
1630+
1631+ property port : Int64
1632+end
1633+
1634+class Postfix
1635+ include JSON::Serializable
1636+
1637+ property postfix : Int64
1638+end
1639+
1640+class Precedence
1641+ include JSON::Serializable
1642+
1643+ property precedence : Int64
1644+end
1645+
1646+class Prefix
1647+ include JSON::Serializable
1648+
1649+ property prefix : Int64
1650+end
1651+
1652+class Print
1653+ include JSON::Serializable
1654+
1655+ property print : Int64
1656+end
1657+
1658+class PrintMembers
1659+ include JSON::Serializable
1660+
1661+ @[JSON::Field(key: "printMembers")]
1662+ property print_members : Int64
1663+end
1664+
1665+class Printf
1666+ include JSON::Serializable
1667+
1668+ property printf : Int64
1669+end
1670+
1671+class Protocol
1672+ include JSON::Serializable
1673+
1674+ @[JSON::Field(key: "Protocol")]
1675+ property protocol : Int64
1676+end
1677+
1678+class Obj4
1679+ include JSON::Serializable
1680+
1681+ property dummy : Int64
1682+
1683+ @[JSON::Field(key: "require")]
1684+ property obj4_require : Require
1685+
1686+ @[JSON::Field(key: "return")]
1687+ property obj4_return : Return
1688+
1689+ @[JSON::Field(key: "select")]
1690+ property obj4_select : Select
1691+
1692+ @[JSON::Field(key: "Self")]
1693+ property obj4_self : Self
1694+
1695+ @[JSON::Field(key: "sizeof")]
1696+ property obj4_sizeof : Sizeof
1697+
1698+ @[JSON::Field(key: "struct")]
1699+ property obj4_struct : StructClass
1700+
1701+ @[JSON::Field(key: "super")]
1702+ property obj4_super : Super
1703+
1704+ @[JSON::Field(key: "then")]
1705+ property obj4_then : Then
1706+
1707+ @[JSON::Field(key: "True")]
1708+ property obj4_true : True
1709+
1710+ @[JSON::Field(key: "Type")]
1711+ property obj4_type : Type
1712+
1713+ @[JSON::Field(key: "typeof")]
1714+ property obj4_typeof : Typeof
1715+
1716+ property public : Public
1717+
1718+ @[JSON::Field(key: "self")]
1719+ property purple_self : SelfClass
1720+
1721+ @[JSON::Field(key: "true")]
1722+ property purple_true : TrueClass
1723+
1724+ @[JSON::Field(key: "type")]
1725+ property purple_type : TypeClass
1726+
1727+ property quicktype : Quicktype
1728+
1729+ property raise : Raise
1730+
1731+ property range : RangeClass
1732+
1733+ property readonly : Readonly
1734+
1735+ property ref : Ref
1736+
1737+ property register : Register
1738+
1739+ property reinterpret_cast : ReinterpretCast
1740+
1741+ property repeat : Repeat
1742+
1743+ property required : Required
1744+
1745+ property requires : Requires
1746+
1747+ property restrict : Restrict
1748+
1749+ property retain : Retain
1750+
1751+ property rethrows : Rethrows
1752+
1753+ property right : Right
1754+
1755+ property sbyte : Sbyte
1756+
1757+ property sealed : Sealed
1758+
1759+ @[JSON::Field(key: "SEL")]
1760+ property sel : Sel
1761+
1762+ property serialize : Serialize
1763+
1764+ property set : SetClass
1765+
1766+ property short : Short
1767+
1768+ property signed : Signed
1769+
1770+ property stackalloc : Stackalloc
1771+
1772+ property static : Static
1773+
1774+ property static_assert : StaticAssert
1775+
1776+ property static_cast : StaticCast
1777+
1778+ property strictfp : Strictfp
1779+
1780+ property string : StringClass
1781+
1782+ property subscript : Subscript
1783+
1784+ property switch : Switch
1785+
1786+ property symbol : SymbolClass
1787+
1788+ property synchronized : Synchronized
1789+
1790+ property system : SystemClass
1791+
1792+ property template : Template
1793+
1794+ property this : This
1795+
1796+ property thread_local : ThreadLocalClass
1797+
1798+ property throw : Throw
1799+
1800+ property throws : Throws
1801+
1802+ property to_json : ToJson
1803+
1804+ property top_level : TopLevelClass
1805+
1806+ property transient : Transient
1807+
1808+ property try : Try
1809+
1810+ property typealias : Typealias
1811+
1812+ property typedef : Typedef
1813+
1814+ property typeid : Typeid
1815+
1816+ property typename : Typename
1817+
1818+ property uint : Uint
1819+
1820+ property ulong : Ulong
1821+
1822+ property unchecked : Unchecked
1823+
1824+ property undefined : Undefined
1825+end
1826+
1827+class Require
1828+ include JSON::Serializable
1829+
1830+ @[JSON::Field(key: "require")]
1831+ property require_require : Int64
1832+end
1833+
1834+class Return
1835+ include JSON::Serializable
1836+
1837+ @[JSON::Field(key: "return")]
1838+ property return_return : Int64
1839+end
1840+
1841+class Select
1842+ include JSON::Serializable
1843+
1844+ @[JSON::Field(key: "select")]
1845+ property select_select : Int64
1846+end
1847+
1848+class Self
1849+ include JSON::Serializable
1850+
1851+ @[JSON::Field(key: "Self")]
1852+ property self_self : Int64
1853+end
1854+
1855+class Sizeof
1856+ include JSON::Serializable
1857+
1858+ @[JSON::Field(key: "sizeof")]
1859+ property sizeof_sizeof : Int64
1860+end
1861+
1862+class StructClass
1863+ include JSON::Serializable
1864+
1865+ @[JSON::Field(key: "struct")]
1866+ property struct_struct : Int64
1867+end
1868+
1869+class Super
1870+ include JSON::Serializable
1871+
1872+ @[JSON::Field(key: "super")]
1873+ property super_super : Int64
1874+end
1875+
1876+class Then
1877+ include JSON::Serializable
1878+
1879+ @[JSON::Field(key: "then")]
1880+ property then_then : Int64
1881+end
1882+
1883+class True
1884+ include JSON::Serializable
1885+
1886+ @[JSON::Field(key: "True")]
1887+ property true_true : Int64
1888+end
1889+
1890+class Type
1891+ include JSON::Serializable
1892+
1893+ @[JSON::Field(key: "Type")]
1894+ property type_type : Int64
1895+end
1896+
1897+class Typeof
1898+ include JSON::Serializable
1899+
1900+ @[JSON::Field(key: "typeof")]
1901+ property typeof_typeof : Int64
1902+end
1903+
1904+class Public
1905+ include JSON::Serializable
1906+
1907+ property public : Int64
1908+end
1909+
1910+class SelfClass
1911+ include JSON::Serializable
1912+
1913+ @[JSON::Field(key: "self")]
1914+ property self_self : Int64
1915+end
1916+
1917+class TrueClass
1918+ include JSON::Serializable
1919+
1920+ @[JSON::Field(key: "true")]
1921+ property true_true : Int64
1922+end
1923+
1924+class TypeClass
1925+ include JSON::Serializable
1926+
1927+ @[JSON::Field(key: "type")]
1928+ property type_type : Int64
1929+end
1930+
1931+class Quicktype
1932+ include JSON::Serializable
1933+
1934+ property quicktype : Int64
1935+end
1936+
1937+class Raise
1938+ include JSON::Serializable
1939+
1940+ property raise : Int64
1941+end
1942+
1943+class RangeClass
1944+ include JSON::Serializable
1945+
1946+ property range : Int64
1947+end
1948+
1949+class Readonly
1950+ include JSON::Serializable
1951+
1952+ property readonly : Int64
1953+end
1954+
1955+class Ref
1956+ include JSON::Serializable
1957+
1958+ property ref : Int64
1959+end
1960+
1961+class Register
1962+ include JSON::Serializable
1963+
1964+ property register : Int64
1965+end
1966+
1967+class ReinterpretCast
1968+ include JSON::Serializable
1969+
1970+ property reinterpret_cast : Int64
1971+end
1972+
1973+class Repeat
1974+ include JSON::Serializable
1975+
1976+ property repeat : Int64
1977+end
1978+
1979+class Required
1980+ include JSON::Serializable
1981+
1982+ property required : Int64
1983+end
1984+
1985+class Requires
1986+ include JSON::Serializable
1987+
1988+ property requires : Int64
1989+end
1990+
1991+class Restrict
1992+ include JSON::Serializable
1993+
1994+ property restrict : Int64
1995+end
1996+
1997+class Retain
1998+ include JSON::Serializable
1999+
2000+ property retain : Int64
2001+end
2002+
2003+class Rethrows
2004+ include JSON::Serializable
2005+
2006+ property rethrows : Int64
2007+end
2008+
2009+class Right
2010+ include JSON::Serializable
2011+
2012+ property right : Int64
2013+end
2014+
2015+class Sbyte
2016+ include JSON::Serializable
2017+
2018+ property sbyte : Int64
2019+end
2020+
2021+class Sealed
2022+ include JSON::Serializable
2023+
2024+ property sealed : Int64
2025+end
2026+
2027+class Sel
2028+ include JSON::Serializable
2029+
2030+ @[JSON::Field(key: "SEL")]
2031+ property sel : Int64
2032+end
2033+
2034+class Serialize
2035+ include JSON::Serializable
2036+
2037+ property serialize : Int64
2038+end
2039+
2040+class SetClass
2041+ include JSON::Serializable
2042+
2043+ property set : Int64
2044+end
2045+
2046+class Short
2047+ include JSON::Serializable
2048+
2049+ property short : Int64
2050+end
2051+
2052+class Signed
2053+ include JSON::Serializable
2054+
2055+ property signed : Int64
2056+end
2057+
2058+class Stackalloc
2059+ include JSON::Serializable
2060+
2061+ property stackalloc : Int64
2062+end
2063+
2064+class Static
2065+ include JSON::Serializable
2066+
2067+ property static : Int64
2068+end
2069+
2070+class StaticAssert
2071+ include JSON::Serializable
2072+
2073+ property static_assert : Int64
2074+end
2075+
2076+class StaticCast
2077+ include JSON::Serializable
2078+
2079+ property static_cast : Int64
2080+end
2081+
2082+class Strictfp
2083+ include JSON::Serializable
2084+
2085+ property strictfp : Int64
2086+end
2087+
2088+class StringClass
2089+ include JSON::Serializable
2090+
2091+ property string : Int64
2092+end
2093+
2094+class Subscript
2095+ include JSON::Serializable
2096+
2097+ property subscript : Int64
2098+end
2099+
2100+class Switch
2101+ include JSON::Serializable
2102+
2103+ property switch : Int64
2104+end
2105+
2106+class SymbolClass
2107+ include JSON::Serializable
2108+
2109+ property symbol : Int64
2110+end
2111+
2112+class Synchronized
2113+ include JSON::Serializable
2114+
2115+ property synchronized : Int64
2116+end
2117+
2118+class SystemClass
2119+ include JSON::Serializable
2120+
2121+ property system : Int64
2122+end
2123+
2124+class Template
2125+ include JSON::Serializable
2126+
2127+ property template : Int64
2128+end
2129+
2130+class This
2131+ include JSON::Serializable
2132+
2133+ property this : Int64
2134+end
2135+
2136+class ThreadLocalClass
2137+ include JSON::Serializable
2138+
2139+ property thread_local : Int64
2140+end
2141+
2142+class Throw
2143+ include JSON::Serializable
2144+
2145+ property throw : Int64
2146+end
2147+
2148+class Throws
2149+ include JSON::Serializable
2150+
2151+ property throws : Int64
2152+end
2153+
2154+class ToJson
2155+ include JSON::Serializable
2156+
2157+ property to_json : Int64
2158+end
2159+
2160+class TopLevelClass
2161+ include JSON::Serializable
2162+
2163+ property top_level : Int64
2164+end
2165+
2166+class Transient
2167+ include JSON::Serializable
2168+
2169+ property transient : Int64
2170+end
2171+
2172+class Try
2173+ include JSON::Serializable
2174+
2175+ property try : Int64
2176+end
2177+
2178+class Typealias
2179+ include JSON::Serializable
2180+
2181+ property typealias : Int64
2182+end
2183+
2184+class Typedef
2185+ include JSON::Serializable
2186+
2187+ property typedef : Int64
2188+end
2189+
2190+class Typeid
2191+ include JSON::Serializable
2192+
2193+ property typeid : Int64
2194+end
2195+
2196+class Typename
2197+ include JSON::Serializable
2198+
2199+ property typename : Int64
2200+end
2201+
2202+class Uint
2203+ include JSON::Serializable
2204+
2205+ property uint : Int64
2206+end
2207+
2208+class Ulong
2209+ include JSON::Serializable
2210+
2211+ property ulong : Int64
2212+end
2213+
2214+class Unchecked
2215+ include JSON::Serializable
2216+
2217+ property unchecked : Int64
2218+end
2219+
2220+class Undefined
2221+ include JSON::Serializable
2222+
2223+ property undefined : Int64
2224+end
2225+
2226+class Obj5
2227+ include JSON::Serializable
2228+
2229+ property dummy : Int64
2230+
2231+ @[JSON::Field(key: "union")]
2232+ property obj5_union : UnionClass
2233+
2234+ @[JSON::Field(key: "while")]
2235+ property obj5_while : While
2236+
2237+ @[JSON::Field(key: "with")]
2238+ property obj5_with : With
2239+
2240+ @[JSON::Field(key: "yield")]
2241+ property obj5_yield : Yield
2242+
2243+ property unowned : Unowned
2244+
2245+ property unsafe : Unsafe
2246+
2247+ property unsigned : Unsigned
2248+
2249+ property ushort : Ushort
2250+
2251+ property using : Using
2252+
2253+ property var : Var
2254+
2255+ property virtual : Virtual
2256+
2257+ property void : VoidClass
2258+
2259+ property volatile : Volatile
2260+
2261+ property wchar_t : WcharT
2262+
2263+ property weak : Weak
2264+
2265+ property where : Where
2266+
2267+ @[JSON::Field(key: "willSet")]
2268+ property will_set : WillSet
2269+
2270+ property xor : Xor
2271+
2272+ property xor_eq : XorEq
2273+
2274+ @[JSON::Field(key: "YES")]
2275+ property yes : Yes
2276+end
2277+
2278+class UnionClass
2279+ include JSON::Serializable
2280+
2281+ @[JSON::Field(key: "union")]
2282+ property union_union : Int64
2283+end
2284+
2285+class While
2286+ include JSON::Serializable
2287+
2288+ @[JSON::Field(key: "while")]
2289+ property while_while : Int64
2290+end
2291+
2292+class With
2293+ include JSON::Serializable
2294+
2295+ @[JSON::Field(key: "with")]
2296+ property with_with : Int64
2297+end
2298+
2299+class Yield
2300+ include JSON::Serializable
2301+
2302+ @[JSON::Field(key: "yield")]
2303+ property yield_yield : Int64
2304+end
2305+
2306+class Unowned
2307+ include JSON::Serializable
2308+
2309+ property unowned : Int64
2310+end
2311+
2312+class Unsafe
2313+ include JSON::Serializable
2314+
2315+ property unsafe : Int64
2316+end
2317+
2318+class Unsigned
2319+ include JSON::Serializable
2320+
2321+ property unsigned : Int64
2322+end
2323+
2324+class Ushort
2325+ include JSON::Serializable
2326+
2327+ property ushort : Int64
2328+end
2329+
2330+class Using
2331+ include JSON::Serializable
2332+
2333+ property using : Int64
2334+end
2335+
2336+class Var
2337+ include JSON::Serializable
2338+
2339+ property var : Int64
2340+end
2341+
2342+class Virtual
2343+ include JSON::Serializable
2344+
2345+ property virtual : Int64
2346+end
2347+
2348+class VoidClass
2349+ include JSON::Serializable
2350+
2351+ property void : Int64
2352+end
2353+
2354+class Volatile
2355+ include JSON::Serializable
2356+
2357+ property volatile : Int64
2358+end
2359+
2360+class WcharT
2361+ include JSON::Serializable
2362+
2363+ property wchar_t : Int64
2364+end
2365+
2366+class Weak
2367+ include JSON::Serializable
2368+
2369+ property weak : Int64
2370+end
2371+
2372+class Where
2373+ include JSON::Serializable
2374+
2375+ property where : Int64
2376+end
2377+
2378+class WillSet
2379+ include JSON::Serializable
2380+
2381+ @[JSON::Field(key: "willSet")]
2382+ property will_set : Int64
2383+end
2384+
2385+class Xor
2386+ include JSON::Serializable
2387+
2388+ property xor : Int64
2389+end
2390+
2391+class XorEq
2392+ include JSON::Serializable
2393+
2394+ property xor_eq : Int64
2395+end
2396+
2397+class Yes
2398+ include JSON::Serializable
2399+
2400+ @[JSON::Field(key: "YES")]
2401+ property yes : Int64
2402+end
Test case

test/inputs/json/priority/kotlin-enum-class-case-collision.json

1 generated file · +9 −0
Acrystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property category : String
9+end
Test case

test/inputs/json/priority/list.json

1 generated file · +10 −0
Acrystaldefault / TopLevel.cr+10 −0
@@ -0,0 +1,10 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Int64
7+
8+ @[JSON::Field(key: "next")]
9+ property top_level_next : TopLevel?
10+end
Test case

test/inputs/json/priority/name-style.json

1 generated file · +25 −0
Acrystaldefault / TopLevel.cr+25 −0
@@ -0,0 +1,25 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "anEasyOne")]
7+ property an_easy_one : Int64
8+
9+ @[JSON::Field(key: "isMNISTLetter")]
10+ property is_mnist_letter : Bool
11+
12+ @[JSON::Field(key: "JSONString")]
13+ property json_string : String
14+
15+ @[JSON::Field(key: "PrettyEasyToo")]
16+ property pretty_easy_too : Bool
17+
18+ property should_know_that_id_is_an_initialism : String
19+
20+ @[JSON::Field(key: " spaces are separators too ")]
21+ property spaces_are_separators_too : Bool
22+
23+ @[JSON::Field(key: "ZSR_HH_DEMO3_DELMATNR")]
24+ property zsr_hh_demo3_delmatnr : Bool
25+end
Test case

test/inputs/json/priority/nbl-stats.json

1 generated file · +647 −0
Acrystaldefault / TopLevel.cr+647 −0
@@ -0,0 +1,647 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property attendance : Int64
7+
8+ property clock : String
9+
10+ @[JSON::Field(key: "disableMatch")]
11+ property disable_match : Int64
12+
13+ @[JSON::Field(key: "inOT")]
14+ property in_ot : Int64
15+
16+ property leaddata : Array(Array(LeaddatumElement))
17+
18+ property officials_referee1 : String
19+
20+ property officials_referee2 : String
21+
22+ property officials_referee3 : String
23+
24+ property othermatches : Array(Othermatch)
25+
26+ property pbp : Array(Pbp)
27+
28+ property period : Int64
29+
30+ @[JSON::Field(key: "periodLengthOVERTIME")]
31+ property period_length_overtime : Int64
32+
33+ @[JSON::Field(key: "periodLengthREGULAR")]
34+ property period_length_regular : Int64
35+
36+ @[JSON::Field(key: "periodType")]
37+ property period_type : String
38+
39+ @[JSON::Field(key: "periodsMax")]
40+ property periods_max : Int64
41+
42+ property scorers : Hash(String, Array(Scorer))
43+
44+ property timeline : Array(JSON::Any?)
45+
46+ property tm : Hash(String, Tm)
47+
48+ @[JSON::Field(key: "totalTimeAdded")]
49+ property total_time_added : Int64
50+
51+ property totallds : Totallds
52+end
53+
54+class Othermatch
55+ include JSON::Serializable
56+
57+ property clock : String
58+
59+ @[JSON::Field(key: "competitionName")]
60+ property competition_name : String
61+
62+ property id : String
63+
64+ property period : Int64
65+
66+ @[JSON::Field(key: "periodType")]
67+ property period_type : String
68+
69+ property team1 : Team
70+
71+ @[JSON::Field(key: "team1Name")]
72+ property team1_name : String
73+
74+ @[JSON::Field(key: "team1Score")]
75+ property team1_score : Int64
76+
77+ property team2 : Team
78+
79+ @[JSON::Field(key: "team2Name")]
80+ property team2_name : String
81+
82+ @[JSON::Field(key: "team2Score")]
83+ property team2_score : Int64
84+end
85+
86+class Team
87+ include JSON::Serializable
88+
89+ @[JSON::Field(key: "teamCode")]
90+ property team_code : String
91+
92+ @[JSON::Field(key: "teamCodeInternational")]
93+ property team_code_international : String
94+
95+ @[JSON::Field(key: "teamName")]
96+ property team_name : String
97+
98+ @[JSON::Field(key: "teamNameInternational")]
99+ property team_name_international : String
100+end
101+
102+class Pbp
103+ include JSON::Serializable
104+
105+ @[JSON::Field(key: "actionType")]
106+ property action_type : String
107+
108+ @[JSON::Field(key: "familyName")]
109+ property family_name : String?
110+
111+ @[JSON::Field(key: "familyNameInitial")]
112+ property family_name_initial : String?
113+
114+ @[JSON::Field(key: "firstName")]
115+ property first_name : String?
116+
117+ @[JSON::Field(key: "firstNameInitial")]
118+ property first_name_initial : String?
119+
120+ property gt : String
121+
122+ @[JSON::Field(key: "internationalFamilyName")]
123+ property international_family_name : String?
124+
125+ @[JSON::Field(key: "internationalFamilyNameInitial")]
126+ property international_family_name_initial : String?
127+
128+ @[JSON::Field(key: "internationalFirstName")]
129+ property international_first_name : String?
130+
131+ @[JSON::Field(key: "internationalFirstNameInitial")]
132+ property international_first_name_initial : String?
133+
134+ property lead : Int64
135+
136+ property period : Int64
137+
138+ @[JSON::Field(key: "periodType")]
139+ property period_type : String
140+
141+ property player : String
142+
143+ property pno : Int64
144+
145+ property qualifier : String
146+
147+ property s1 : Int64
148+
149+ property s2 : Int64
150+
151+ @[JSON::Field(key: "scoreboardName")]
152+ property scoreboard_name : String?
153+
154+ property scoring : Int64
155+
156+ @[JSON::Field(key: "shirtNumber")]
157+ property shirt_number : String
158+
159+ @[JSON::Field(key: "subType")]
160+ property sub_type : String
161+
162+ property success : Int64
163+
164+ property tno : Int64
165+end
166+
167+class Scorer
168+ include JSON::Serializable
169+
170+ @[JSON::Field(key: "familyName")]
171+ property family_name : String?
172+
173+ @[JSON::Field(key: "familyNameInitial")]
174+ property family_name_initial : String?
175+
176+ @[JSON::Field(key: "firstName")]
177+ property first_name : String?
178+
179+ @[JSON::Field(key: "firstNameInitial")]
180+ property first_name_initial : String?
181+
182+ property gt : String?
183+
184+ @[JSON::Field(key: "internationalFamilyName")]
185+ property international_family_name : String?
186+
187+ @[JSON::Field(key: "internationalFamilyNameInitial")]
188+ property international_family_name_initial : String?
189+
190+ @[JSON::Field(key: "internationalFirstName")]
191+ property international_first_name : String?
192+
193+ @[JSON::Field(key: "internationalFirstNameInitial")]
194+ property international_first_name_initial : String?
195+
196+ property name : String?
197+
198+ property per : Int64?
199+
200+ @[JSON::Field(key: "perType")]
201+ property per_type : String?
202+
203+ property player : String?
204+
205+ property pno : Int64
206+
207+ @[JSON::Field(key: "scoreboardName")]
208+ property scoreboard_name : String?
209+
210+ @[JSON::Field(key: "shirtNumber")]
211+ property shirt_number : String
212+
213+ property summary : String?
214+
215+ property times : Array(TimeElement)?
216+
217+ property tno : Int64
218+
219+ property tot : Int64?
220+end
221+
222+class TimeElement
223+ include JSON::Serializable
224+
225+ property gt : String
226+
227+ property per : Int64
228+
229+ @[JSON::Field(key: "perType")]
230+ property per_type : String
231+end
232+
233+class Tm
234+ include JSON::Serializable
235+
236+ property code : String
237+
238+ @[JSON::Field(key: "codeInternational")]
239+ property code_international : String
240+
241+ property fouls : Int64
242+
243+ property full_score : Int64
244+
245+ property lds : Lds
246+
247+ property logo : String
248+
249+ property name : String
250+
251+ @[JSON::Field(key: "nameInternational")]
252+ property name_international : String
253+
254+ property p1_score : Int64
255+
256+ property p2_score : Int64
257+
258+ property p3_score : Int64
259+
260+ property p4_score : Int64
261+
262+ property pl : Hash(String, Pl)
263+
264+ property score : Int64
265+
266+ property scoring : Array(Scorer)
267+
268+ @[JSON::Field(key: "shortName")]
269+ property short_name : String
270+
271+ @[JSON::Field(key: "shortNameInternational")]
272+ property short_name_international : String
273+
274+ property shot : Array(Shot)
275+
276+ property timeouts : Int64
277+
278+ property tot_eff_1 : Int64
279+
280+ property tot_eff_2 : Int64
281+
282+ property tot_eff_3 : Float64
283+
284+ property tot_eff_4 : Int64
285+
286+ property tot_eff_5 : Int64
287+
288+ property tot_eff_6 : Int64
289+
290+ property tot_eff_7 : Int64
291+
292+ @[JSON::Field(key: "tot_sAssists")]
293+ property tot_s_assists : Int64
294+
295+ @[JSON::Field(key: "tot_sBenchPoints")]
296+ property tot_s_bench_points : Int64
297+
298+ @[JSON::Field(key: "tot_sBiggestLead")]
299+ property tot_s_biggest_lead : Int64
300+
301+ @[JSON::Field(key: "tot_sBiggestScoringRun")]
302+ property tot_s_biggest_scoring_run : Int64
303+
304+ @[JSON::Field(key: "tot_sBlocks")]
305+ property tot_s_blocks : Int64
306+
307+ @[JSON::Field(key: "tot_sBlocksReceived")]
308+ property tot_s_blocks_received : Int64
309+
310+ @[JSON::Field(key: "tot_sFieldGoalsAttempted")]
311+ property tot_s_field_goals_attempted : Int64
312+
313+ @[JSON::Field(key: "tot_sFieldGoalsMade")]
314+ property tot_s_field_goals_made : Int64
315+
316+ @[JSON::Field(key: "tot_sFieldGoalsPercentage")]
317+ property tot_s_field_goals_percentage : Int64
318+
319+ @[JSON::Field(key: "tot_sFoulsOn")]
320+ property tot_s_fouls_on : Int64
321+
322+ @[JSON::Field(key: "tot_sFoulsPersonal")]
323+ property tot_s_fouls_personal : Int64
324+
325+ @[JSON::Field(key: "tot_sFoulsTeam")]
326+ property tot_s_fouls_team : Int64
327+
328+ @[JSON::Field(key: "tot_sFreeThrowsAttempted")]
329+ property tot_s_free_throws_attempted : Int64
330+
331+ @[JSON::Field(key: "tot_sFreeThrowsMade")]
332+ property tot_s_free_throws_made : Int64
333+
334+ @[JSON::Field(key: "tot_sFreeThrowsPercentage")]
335+ property tot_s_free_throws_percentage : Int64
336+
337+ @[JSON::Field(key: "tot_sLeadChanges")]
338+ property tot_s_lead_changes : Int64
339+
340+ @[JSON::Field(key: "tot_sMinutes")]
341+ property tot_s_minutes : Int64
342+
343+ @[JSON::Field(key: "tot_sPoints")]
344+ property tot_s_points : Int64
345+
346+ @[JSON::Field(key: "tot_sPointsFastBreak")]
347+ property tot_s_points_fast_break : Int64
348+
349+ @[JSON::Field(key: "tot_sPointsFromTurnovers")]
350+ property tot_s_points_from_turnovers : Int64
351+
352+ @[JSON::Field(key: "tot_sPointsInThePaint")]
353+ property tot_s_points_in_the_paint : Int64
354+
355+ @[JSON::Field(key: "tot_sPointsSecondChance")]
356+ property tot_s_points_second_chance : Int64
357+
358+ @[JSON::Field(key: "tot_sReboundsDefensive")]
359+ property tot_s_rebounds_defensive : Int64
360+
361+ @[JSON::Field(key: "tot_sReboundsOffensive")]
362+ property tot_s_rebounds_offensive : Int64
363+
364+ @[JSON::Field(key: "tot_sReboundsTeam")]
365+ property tot_s_rebounds_team : Int64
366+
367+ @[JSON::Field(key: "tot_sReboundsTeamDefensive")]
368+ property tot_s_rebounds_team_defensive : Int64
369+
370+ @[JSON::Field(key: "tot_sReboundsTeamOffensive")]
371+ property tot_s_rebounds_team_offensive : Int64
372+
373+ @[JSON::Field(key: "tot_sReboundsTotal")]
374+ property tot_s_rebounds_total : Int64
375+
376+ @[JSON::Field(key: "tot_sSteals")]
377+ property tot_s_steals : Int64
378+
379+ @[JSON::Field(key: "tot_sThreePointersAttempted")]
380+ property tot_s_three_pointers_attempted : Int64
381+
382+ @[JSON::Field(key: "tot_sThreePointersMade")]
383+ property tot_s_three_pointers_made : Int64
384+
385+ @[JSON::Field(key: "tot_sThreePointersPercentage")]
386+ property tot_s_three_pointers_percentage : Int64
387+
388+ @[JSON::Field(key: "tot_sTimeLeading")]
389+ property tot_s_time_leading : Float64
390+
391+ @[JSON::Field(key: "tot_sTimesScoresLevel")]
392+ property tot_s_times_scores_level : Int64
393+
394+ @[JSON::Field(key: "tot_sTurnovers")]
395+ property tot_s_turnovers : Int64
396+
397+ @[JSON::Field(key: "tot_sTurnoversTeam")]
398+ property tot_s_turnovers_team : Int64
399+
400+ @[JSON::Field(key: "tot_sTwoPointersAttempted")]
401+ property tot_s_two_pointers_attempted : Int64
402+
403+ @[JSON::Field(key: "tot_sTwoPointersMade")]
404+ property tot_s_two_pointers_made : Int64
405+
406+ @[JSON::Field(key: "tot_sTwoPointersPercentage")]
407+ property tot_s_two_pointers_percentage : Int64
408+end
409+
410+class Lds
411+ include JSON::Serializable
412+
413+ @[JSON::Field(key: "sAssists")]
414+ property s_assists : Hash(String, Scorer)
415+
416+ @[JSON::Field(key: "sBlocks")]
417+ property s_blocks : SBlocks
418+
419+ @[JSON::Field(key: "sPoints")]
420+ property s_points : Hash(String, Scorer)
421+
422+ @[JSON::Field(key: "sReboundsTotal")]
423+ property s_rebounds_total : Hash(String, Scorer)
424+
425+ @[JSON::Field(key: "sSteals")]
426+ property s_steals : Hash(String, Scorer)
427+end
428+
429+class SBlocks
430+ include JSON::Serializable
431+
432+ @[JSON::Field(key: "1")]
433+ property the_1 : Scorer
434+end
435+
436+class Pl
437+ include JSON::Serializable
438+
439+ property active : Int64
440+
441+ property captain : Int64?
442+
443+ property comp : Comp?
444+
445+ property eff_1 : Int64
446+
447+ property eff_2 : Int64
448+
449+ property eff_3 : Float64
450+
451+ property eff_4 : Float64
452+
453+ property eff_5 : Int64
454+
455+ property eff_6 : Int64
456+
457+ property eff_7 : Int64
458+
459+ @[JSON::Field(key: "familyName")]
460+ property family_name : String
461+
462+ @[JSON::Field(key: "familyNameInitial")]
463+ property family_name_initial : String
464+
465+ @[JSON::Field(key: "firstName")]
466+ property first_name : String
467+
468+ @[JSON::Field(key: "firstNameInitial")]
469+ property first_name_initial : String
470+
471+ @[JSON::Field(key: "internationalFamilyName")]
472+ property international_family_name : String
473+
474+ @[JSON::Field(key: "internationalFamilyNameInitial")]
475+ property international_family_name_initial : String
476+
477+ @[JSON::Field(key: "internationalFirstName")]
478+ property international_first_name : String
479+
480+ @[JSON::Field(key: "internationalFirstNameInitial")]
481+ property international_first_name_initial : String
482+
483+ property name : String
484+
485+ @[JSON::Field(key: "playingPosition")]
486+ property playing_position : String
487+
488+ @[JSON::Field(key: "sAssists")]
489+ property s_assists : Int64
490+
491+ @[JSON::Field(key: "sBlocks")]
492+ property s_blocks : Int64
493+
494+ @[JSON::Field(key: "sBlocksReceived")]
495+ property s_blocks_received : Int64
496+
497+ @[JSON::Field(key: "sFieldGoalsAttempted")]
498+ property s_field_goals_attempted : Int64
499+
500+ @[JSON::Field(key: "sFieldGoalsMade")]
501+ property s_field_goals_made : Int64
502+
503+ @[JSON::Field(key: "sFieldGoalsPercentage")]
504+ property s_field_goals_percentage : Int64
505+
506+ @[JSON::Field(key: "sFoulsOn")]
507+ property s_fouls_on : Int64
508+
509+ @[JSON::Field(key: "sFoulsPersonal")]
510+ property s_fouls_personal : Int64
511+
512+ @[JSON::Field(key: "sFreeThrowsAttempted")]
513+ property s_free_throws_attempted : Int64
514+
515+ @[JSON::Field(key: "sFreeThrowsMade")]
516+ property s_free_throws_made : Int64
517+
518+ @[JSON::Field(key: "sFreeThrowsPercentage")]
519+ property s_free_throws_percentage : Int64
520+
521+ @[JSON::Field(key: "sMinutes")]
522+ property s_minutes : SMinutes
523+
524+ @[JSON::Field(key: "sPlusMinusPoints")]
525+ property s_plus_minus_points : Int64
526+
527+ @[JSON::Field(key: "sPoints")]
528+ property s_points : Int64
529+
530+ @[JSON::Field(key: "sPointsFastBreak")]
531+ property s_points_fast_break : Int64
532+
533+ @[JSON::Field(key: "sPointsInThePaint")]
534+ property s_points_in_the_paint : Int64
535+
536+ @[JSON::Field(key: "sPointsSecondChance")]
537+ property s_points_second_chance : Int64
538+
539+ @[JSON::Field(key: "sReboundsDefensive")]
540+ property s_rebounds_defensive : Int64
541+
542+ @[JSON::Field(key: "sReboundsOffensive")]
543+ property s_rebounds_offensive : Int64
544+
545+ @[JSON::Field(key: "sReboundsTotal")]
546+ property s_rebounds_total : Int64
547+
548+ @[JSON::Field(key: "sSteals")]
549+ property s_steals : Int64
550+
551+ @[JSON::Field(key: "sThreePointersAttempted")]
552+ property s_three_pointers_attempted : Int64
553+
554+ @[JSON::Field(key: "sThreePointersMade")]
555+ property s_three_pointers_made : Int64
556+
557+ @[JSON::Field(key: "sThreePointersPercentage")]
558+ property s_three_pointers_percentage : Int64
559+
560+ @[JSON::Field(key: "sTurnovers")]
561+ property s_turnovers : Int64
562+
563+ @[JSON::Field(key: "sTwoPointersAttempted")]
564+ property s_two_pointers_attempted : Int64
565+
566+ @[JSON::Field(key: "sTwoPointersMade")]
567+ property s_two_pointers_made : Int64
568+
569+ @[JSON::Field(key: "sTwoPointersPercentage")]
570+ property s_two_pointers_percentage : Int64
571+
572+ @[JSON::Field(key: "shirtNumber")]
573+ property shirt_number : String
574+
575+ property starter : Int64
576+end
577+
578+class Comp
579+ include JSON::Serializable
580+
581+ @[JSON::Field(key: "sAssistsAverage")]
582+ property s_assists_average : Float64
583+
584+ @[JSON::Field(key: "sMinutesAverage")]
585+ property s_minutes_average : String
586+
587+ @[JSON::Field(key: "sPointsAverage")]
588+ property s_points_average : Float64
589+
590+ @[JSON::Field(key: "sReboundsTotalAverage")]
591+ property s_rebounds_total_average : Float64
592+end
593+
594+class Shot
595+ include JSON::Serializable
596+
597+ @[JSON::Field(key: "actionType")]
598+ property action_type : String
599+
600+ property p : Int64
601+
602+ property per : Int64
603+
604+ @[JSON::Field(key: "perType")]
605+ property per_type : String
606+
607+ property player : String
608+
609+ property pno : Int64
610+
611+ property r : Int64
612+
613+ @[JSON::Field(key: "shirtNumber")]
614+ property shirt_number : String
615+
616+ @[JSON::Field(key: "subType")]
617+ property sub_type : String
618+
619+ property tno : Int64
620+
621+ property x : Int64
622+
623+ property y : Int64
624+end
625+
626+class Totallds
627+ include JSON::Serializable
628+
629+ @[JSON::Field(key: "sAssists")]
630+ property s_assists : Hash(String, Scorer)
631+
632+ @[JSON::Field(key: "sBlocks")]
633+ property s_blocks : Hash(String, Scorer)
634+
635+ @[JSON::Field(key: "sPoints")]
636+ property s_points : Hash(String, Scorer)
637+
638+ @[JSON::Field(key: "sReboundsTotal")]
639+ property s_rebounds_total : Hash(String, Scorer)
640+
641+ @[JSON::Field(key: "sSteals")]
642+ property s_steals : Hash(String, Scorer)
643+end
644+
645+alias LeaddatumElement = Int64 | String
646+
647+alias SMinutes = Int64 | String
Test case

test/inputs/json/priority/nested-objects.json

1 generated file · +9 −0
Acrystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property a : Hash(String, Int64)
7+
8+ property b : Hash(String, Int64)
9+end
Test case

test/inputs/json/priority/no-classes.json

1 generated file · +3 −0
Acrystaldefault / TopLevel.cr+3 −0
@@ -0,0 +1,3 @@
1+require "json"
2+
3+alias TopLevel = Int64
Test case

test/inputs/json/priority/number-map.json

1 generated file · +7 −0
Acrystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : Hash(String, Float64)
7+end
Test case

test/inputs/json/priority/omit-empty.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property results : Array(Result)
7+end
8+
9+class Result
10+ include JSON::Serializable
11+
12+ property age : Int64
13+
14+ property name : Nil
15+end
Test case

test/inputs/json/priority/optional-union.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property a : A?
9+end
10+
11+alias A = Int64 | String
Test case

test/inputs/json/priority/php-mixed-union.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property mixed : Array(MixedElement?)
7+end
8+
9+class MixedClass
10+ include JSON::Serializable
11+
12+ property nested : String
13+end
14+
15+alias MixedElement = Int64 | MixedClass | Bool | String
Test case

test/inputs/json/priority/php-validation.json

1 generated file · +15 −0
Acrystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property boolean : Bool
7+
8+ property integer : Int64
9+
10+ property integers : Array(Int64)
11+
12+ property number : Float64
13+
14+ property string : String
15+end
Test case

test/inputs/json/priority/recursive.json

1 generated file · +214 −0
Acrystaldefault / TopLevel.cr+214 −0
@@ -0,0 +1,214 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property category : Category
7+
8+ property details : Details
9+
10+ property match : String
11+
12+ property page : Int64
13+
14+ property product : Array(ProductElement)
15+
16+ property schk : Bool
17+
18+ property totallooseoffers : Int64
19+
20+ property totalpages : Int64
21+
22+ property totalresultsavailable : Int64
23+
24+ property totalresultsreturned : Int64
25+end
26+
27+class Category
28+ include JSON::Serializable
29+
30+ property concatenatecategoryname : Bool
31+
32+ property hasoffer : Bool
33+
34+ property id : Int64
35+
36+ property isfinal : Bool
37+
38+ property links : Array(LinkElement)
39+
40+ property name : String
41+
42+ property parentcategoryid : Int64
43+
44+ property thumbnail : CategoryThumbnail
45+end
46+
47+class LinkElement
48+ include JSON::Serializable
49+
50+ property link : LinkLink
51+end
52+
53+class LinkLink
54+ include JSON::Serializable
55+
56+ @[JSON::Field(key: "type")]
57+ property link_type : String
58+
59+ property url : String
60+end
61+
62+class CategoryThumbnail
63+ include JSON::Serializable
64+
65+ property url : String
66+end
67+
68+class Details
69+ include JSON::Serializable
70+
71+ property applicationid : String
72+
73+ property applicationversion : String
74+
75+ property code : Int64
76+
77+ property date : Date
78+
79+ property elapsedtime : Int64
80+
81+ property message : String
82+
83+ property status : String
84+end
85+
86+class Date
87+ include JSON::Serializable
88+
89+ property day : Int64
90+
91+ property eonandyear : Eonandyear
92+
93+ property hour : Int64
94+
95+ property millisecond : Int64
96+
97+ property minute : Int64
98+
99+ property month : Int64
100+
101+ property second : Int64
102+
103+ property timezone : Int64
104+
105+ property valid : Bool
106+
107+ property xmlschematype : Xmlschematype
108+
109+ property year : Int64
110+end
111+
112+class Eonandyear
113+ include JSON::Serializable
114+
115+ property lowestsetbit : Int64
116+end
117+
118+class Xmlschematype
119+ include JSON::Serializable
120+
121+ property localpart : String
122+
123+ property namespaceuri : String
124+
125+ property prefix : String
126+end
127+
128+class ProductElement
129+ include JSON::Serializable
130+
131+ property product : ProductProduct
132+end
133+
134+class ProductProduct
135+ include JSON::Serializable
136+
137+ property categoryid : Int64
138+
139+ property currency : Currency
140+
141+ property eco : Bool
142+
143+ property fulldescription : Bool
144+
145+ property hasmetasearch : Bool
146+
147+ property id : Int64
148+
149+ property links : Array(LinkElement)
150+
151+ property numoffers : Int64
152+
153+ property pricemax : String
154+
155+ property pricemin : String
156+
157+ property productname : String
158+
159+ property quantity : Int64
160+
161+ property rating : Rating
162+
163+ property specification : Specification
164+
165+ property thumbnail : FormatsClass
166+
167+ property totalsellers : Int64
168+end
169+
170+class Currency
171+ include JSON::Serializable
172+
173+ property abbreviation : String
174+end
175+
176+class Rating
177+ include JSON::Serializable
178+
179+ property useraveragerating : Useraveragerating
180+end
181+
182+class Useraveragerating
183+ include JSON::Serializable
184+
185+ property links : Array(LinkElement)
186+
187+ property numcomments : Int64
188+
189+ property rating : String
190+end
191+
192+class Specification
193+ include JSON::Serializable
194+
195+ property links : Array(LinkElement)
196+end
197+
198+class Format
199+ include JSON::Serializable
200+
201+ property formats : FormatsClass
202+end
203+
204+class FormatsClass
205+ include JSON::Serializable
206+
207+ property formats : Array(Format)?
208+
209+ property height : Int64
210+
211+ property url : String
212+
213+ property width : Int64
214+end
Test case

test/inputs/json/priority/union-constructor-clash.json

1 generated file · +19 −0
Acrystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "BoolInUnion")]
7+ property bool_in_union : BoolInUnion
8+
9+ @[JSON::Field(key: "union")]
10+ property top_level_union : Array(UnionElement)
11+end
12+
13+class BoolInUnion
14+ include JSON::Serializable
15+
16+ property a : Bool
17+end
18+
19+alias UnionElement = Int64 | Bool
Test case

test/inputs/json/priority/unions.json

1 generated file · +21 −0
Acrystaldefault / TopLevel.cr+21 −0
@@ -0,0 +1,21 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property x : Array(X?)
7+
8+ property y : Array(Int64?)
9+
10+ property z : Array(ZElement)
11+end
12+
13+class ZClass
14+ include JSON::Serializable
15+
16+ property a : Bool
17+end
18+
19+alias X = Int64 | String
20+
21+alias ZElement = Int64 | Array(Int64) | ZClass
Test case

test/inputs/json/priority/url.json

1 generated file · +10 −0
Acrystaldefault / TopLevel.cr+10 −0
@@ -0,0 +1,10 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "fromURL")]
7+ property from_url : String
8+
9+ property url : String
10+end
Test case

test/inputs/json/priority/uuids.json

1 generated file · +23 −0
Acrystaldefault / TopLevel.cr+23 −0
@@ -0,0 +1,23 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "booleanValue")]
7+ property boolean_value : Bool
8+
9+ @[JSON::Field(key: "doubleValue")]
10+ property double_value : Float64
11+
12+ @[JSON::Field(key: "intValue")]
13+ property int_value : Int64
14+
15+ @[JSON::Field(key: "stringValue")]
16+ property string_value : String
17+
18+ @[JSON::Field(key: "uuidValue")]
19+ property uuid_value : String
20+
21+ @[JSON::Field(key: "uuidValues")]
22+ property uuid_values : Array(String)
23+end
Test case

test/inputs/json/samples/bitcoin-block.json

1 generated file · +16 −0
Acrystaldefault / TopLevel.cr+16 −0
@@ -0,0 +1,16 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property block_index : Int64
7+
8+ property hash : String
9+
10+ property height : Int64
11+
12+ property time : Int64
13+
14+ @[JSON::Field(key: "txIndexes")]
15+ property tx_indexes : Array(Int64)
16+end
Test case

test/inputs/json/samples/getting-started.json

1 generated file · +9 −0
Acrystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property greeting : String
7+
8+ property instructions : Array(String)
9+end
Test case

test/inputs/json/samples/github-events.json

1 generated file · +546 −0
Acrystaldefault / TopLevel.cr+546 −0
@@ -0,0 +1,546 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property actor : Actor
9+
10+ property created_at : String
11+
12+ property id : String
13+
14+ property org : Actor?
15+
16+ property payload : Payload
17+
18+ property public : Bool
19+
20+ property repo : TopLevelRepo
21+
22+ @[JSON::Field(key: "type")]
23+ property top_level_type : String
24+end
25+
26+class Actor
27+ include JSON::Serializable
28+
29+ property avatar_url : String
30+
31+ property display_login : String?
32+
33+ property gravatar_id : String
34+
35+ property id : Int64
36+
37+ property login : String
38+
39+ property url : String
40+end
41+
42+class Payload
43+ include JSON::Serializable
44+
45+ property action : String?
46+
47+ property before : String?
48+
49+ property comment : Comment?
50+
51+ property commits : Array(Commit)?
52+
53+ property description : String?
54+
55+ property distinct_size : Int64?
56+
57+ property head : String?
58+
59+ property issue : Issue?
60+
61+ property master_branch : String?
62+
63+ property number : Int64?
64+
65+ property pull_request : PayloadPullRequest?
66+
67+ property push_id : Int64?
68+
69+ property pusher_type : String?
70+
71+ property ref : String?
72+
73+ property ref_type : String?
74+
75+ property size : Int64?
76+end
77+
78+class Comment
79+ include JSON::Serializable
80+
81+ property body : String
82+
83+ property created_at : String
84+
85+ property html_url : String
86+
87+ property id : Int64
88+
89+ property issue_url : String
90+
91+ property updated_at : String
92+
93+ property url : String
94+
95+ property user : User
96+end
97+
98+class User
99+ include JSON::Serializable
100+
101+ property avatar_url : String
102+
103+ property events_url : String
104+
105+ property followers_url : String
106+
107+ property following_url : String
108+
109+ property gists_url : String
110+
111+ property gravatar_id : String
112+
113+ property html_url : String
114+
115+ property id : Int64
116+
117+ property login : String
118+
119+ property organizations_url : String
120+
121+ property received_events_url : String
122+
123+ property repos_url : String
124+
125+ property site_admin : Bool
126+
127+ property starred_url : String
128+
129+ property subscriptions_url : String
130+
131+ property url : String
132+
133+ @[JSON::Field(key: "type")]
134+ property user_type : String
135+end
136+
137+class Commit
138+ include JSON::Serializable
139+
140+ property author : Author
141+
142+ property distinct : Bool
143+
144+ property message : String
145+
146+ property sha : String
147+
148+ property url : String
149+end
150+
151+class Author
152+ include JSON::Serializable
153+
154+ property email : String
155+
156+ property name : String
157+end
158+
159+class Issue
160+ include JSON::Serializable
161+
162+ property assignee : Nil
163+
164+ property assignees : Array(JSON::Any?)
165+
166+ property body : String
167+
168+ property closed_at : String?
169+
170+ property comments : Int64
171+
172+ property comments_url : String
173+
174+ property created_at : String
175+
176+ property events_url : String
177+
178+ property html_url : String
179+
180+ property id : Int64
181+
182+ property labels : Array(Label)
183+
184+ property labels_url : String
185+
186+ property locked : Bool
187+
188+ property milestone : Milestone?
189+
190+ property number : Int64
191+
192+ property pull_request : IssuePullRequest?
193+
194+ property repository_url : String
195+
196+ property state : String
197+
198+ property title : String
199+
200+ property updated_at : String
201+
202+ property url : String
203+
204+ property user : User
205+end
206+
207+class Label
208+ include JSON::Serializable
209+
210+ property color : String
211+
212+ property default : Bool
213+
214+ property id : Int64
215+
216+ property name : String
217+
218+ property url : String
219+end
220+
221+class Milestone
222+ include JSON::Serializable
223+
224+ property closed_at : Nil
225+
226+ property closed_issues : Int64
227+
228+ property created_at : String
229+
230+ property creator : User
231+
232+ property description : String
233+
234+ property due_on : String?
235+
236+ property html_url : String
237+
238+ property id : Int64
239+
240+ property labels_url : String
241+
242+ property number : Int64
243+
244+ property open_issues : Int64
245+
246+ property state : String
247+
248+ property title : String
249+
250+ property updated_at : String
251+
252+ property url : String
253+end
254+
255+class IssuePullRequest
256+ include JSON::Serializable
257+
258+ property diff_url : String
259+
260+ property html_url : String
261+
262+ property patch_url : String
263+
264+ property url : String
265+end
266+
267+class PayloadPullRequest
268+ include JSON::Serializable
269+
270+ property additions : Int64
271+
272+ property assignee : Nil
273+
274+ property assignees : Array(JSON::Any?)
275+
276+ property base : Base
277+
278+ property body : String
279+
280+ property changed_files : Int64
281+
282+ property closed_at : String
283+
284+ property comments : Int64
285+
286+ property comments_url : String
287+
288+ property commits : Int64
289+
290+ property commits_url : String
291+
292+ property created_at : String
293+
294+ property deletions : Int64
295+
296+ property diff_url : String
297+
298+ property head : Base
299+
300+ property html_url : String
301+
302+ property id : Int64
303+
304+ property issue_url : String
305+
306+ @[JSON::Field(key: "_links")]
307+ property links : Links
308+
309+ property locked : Bool
310+
311+ property maintainer_can_modify : Bool
312+
313+ property merge_commit_sha : String
314+
315+ property mergeable : Nil
316+
317+ property mergeable_state : String
318+
319+ property merged : Bool
320+
321+ property merged_at : String
322+
323+ property merged_by : User
324+
325+ property milestone : Nil
326+
327+ property number : Int64
328+
329+ property patch_url : String
330+
331+ property rebaseable : Nil
332+
333+ property requested_reviewers : Array(JSON::Any?)
334+
335+ property review_comment_url : String
336+
337+ property review_comments : Int64
338+
339+ property review_comments_url : String
340+
341+ property state : String
342+
343+ property statuses_url : String
344+
345+ property title : String
346+
347+ property updated_at : String
348+
349+ property url : String
350+
351+ property user : User
352+end
353+
354+class Base
355+ include JSON::Serializable
356+
357+ property label : String
358+
359+ property ref : String
360+
361+ property repo : BaseRepo
362+
363+ property sha : String
364+
365+ property user : User
366+end
367+
368+class BaseRepo
369+ include JSON::Serializable
370+
371+ property archive_url : String
372+
373+ property assignees_url : String
374+
375+ property blobs_url : String
376+
377+ property branches_url : String
378+
379+ property clone_url : String
380+
381+ property collaborators_url : String
382+
383+ property comments_url : String
384+
385+ property commits_url : String
386+
387+ property compare_url : String
388+
389+ property contents_url : String
390+
391+ property contributors_url : String
392+
393+ property created_at : String
394+
395+ property default_branch : String
396+
397+ property deployments_url : String
398+
399+ property description : String
400+
401+ property downloads_url : String
402+
403+ property events_url : String
404+
405+ property fork : Bool
406+
407+ property forks : Int64
408+
409+ property forks_count : Int64
410+
411+ property forks_url : String
412+
413+ property full_name : String
414+
415+ property git_commits_url : String
416+
417+ property git_refs_url : String
418+
419+ property git_tags_url : String
420+
421+ property git_url : String
422+
423+ property has_downloads : Bool
424+
425+ property has_issues : Bool
426+
427+ property has_pages : Bool
428+
429+ property has_projects : Bool
430+
431+ property has_wiki : Bool
432+
433+ property homepage : String
434+
435+ property hooks_url : String
436+
437+ property html_url : String
438+
439+ property id : Int64
440+
441+ property issue_comment_url : String
442+
443+ property issue_events_url : String
444+
445+ property issues_url : String
446+
447+ property keys_url : String
448+
449+ property labels_url : String
450+
451+ property language : String
452+
453+ property languages_url : String
454+
455+ property merges_url : String
456+
457+ property milestones_url : String
458+
459+ property mirror_url : Nil
460+
461+ property name : String
462+
463+ property notifications_url : String
464+
465+ property open_issues : Int64
466+
467+ property open_issues_count : Int64
468+
469+ property owner : User
470+
471+ property pulls_url : String
472+
473+ property pushed_at : String
474+
475+ property releases_url : String
476+
477+ @[JSON::Field(key: "private")]
478+ property repo_private : Bool
479+
480+ property size : Int64
481+
482+ property ssh_url : String
483+
484+ property stargazers_count : Int64
485+
486+ property stargazers_url : String
487+
488+ property statuses_url : String
489+
490+ property subscribers_url : String
491+
492+ property subscription_url : String
493+
494+ property svn_url : String
495+
496+ property tags_url : String
497+
498+ property teams_url : String
499+
500+ property trees_url : String
501+
502+ property updated_at : String
503+
504+ property url : String
505+
506+ property watchers : Int64
507+
508+ property watchers_count : Int64
509+end
510+
511+class Links
512+ include JSON::Serializable
513+
514+ property comments : Comments
515+
516+ property commits : Comments
517+
518+ property html : Comments
519+
520+ property issue : Comments
521+
522+ @[JSON::Field(key: "self")]
523+ property links_self : Comments
524+
525+ property review_comment : Comments
526+
527+ property review_comments : Comments
528+
529+ property statuses : Comments
530+end
531+
532+class Comments
533+ include JSON::Serializable
534+
535+ property href : String
536+end
537+
538+class TopLevelRepo
539+ include JSON::Serializable
540+
541+ property id : Int64
542+
543+ property name : String
544+
545+ property url : String
546+end
Test case

test/inputs/json/samples/kitchen-sink.json

1 generated file · +75 −0
Acrystaldefault / TopLevel.cr+75 −0
@@ -0,0 +1,75 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "booleanValue")]
7+ property boolean_value : Bool
8+
9+ @[JSON::Field(key: "dateValue")]
10+ property date_value : String
11+
12+ @[JSON::Field(key: "differentThings")]
13+ property different_things : Array(DifferentThingElement)
14+
15+ @[JSON::Field(key: "doubleValue")]
16+ property double_value : Float64
17+
18+ @[JSON::Field(key: "intValue")]
19+ property int_value : Int64
20+
21+ @[JSON::Field(key: "mapValue")]
22+ property map_value : Hash(String, Int64?)
23+
24+ @[JSON::Field(key: "name with spaces")]
25+ property name_with_spaces : Nil
26+
27+ @[JSON::Field(key: "nullValue")]
28+ property null_value : Nil
29+
30+ @[JSON::Field(key: "nullableMapValue")]
31+ property nullable_map_value : Hash(String, Int64?)
32+
33+ property people : Array(PersonElement)
34+
35+ property person : PurplePerson
36+
37+ @[JSON::Field(key: "stringValue")]
38+ property string_value : String
39+
40+ property tuples : Array(Array(IntOrString))
41+
42+ @[JSON::Field(key: "uuidValue")]
43+ property uuid_value : String
44+end
45+
46+class DifferentThingClass
47+ include JSON::Serializable
48+
49+ property name : String
50+end
51+
52+class PersonElement
53+ include JSON::Serializable
54+
55+ @[JSON::Field(key: "intOrString")]
56+ property int_or_string : IntOrString
57+
58+ property name : String
59+
60+ @[JSON::Field(key: "optionalValue")]
61+ property optional_value : Bool?
62+end
63+
64+class PurplePerson
65+ include JSON::Serializable
66+
67+ @[JSON::Field(key: "intOrString")]
68+ property int_or_string : Int64
69+
70+ property name : String
71+end
72+
73+alias DifferentThingElement = DifferentThingClass | Int64 | String
74+
75+alias IntOrString = Int64 | String
Test case

test/inputs/json/samples/null-safe.json

1 generated file · +29 −0
Acrystaldefault / TopLevel.cr+29 −0
@@ -0,0 +1,29 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property item : Array(Item)
7+end
8+
9+class Item
10+ include JSON::Serializable
11+
12+ property address : Address?
13+
14+ property created_at : String?
15+
16+ property name : String
17+
18+ property sex : Int64?
19+end
20+
21+class Address
22+ include JSON::Serializable
23+
24+ property city : String
25+
26+ property country : String
27+
28+ property street : String
29+end
Test case

test/inputs/json/samples/pokedex.json

1 generated file · +54 −0
Acrystaldefault / TopLevel.cr+54 −0
@@ -0,0 +1,54 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property pokemon : Array(Pokemon)
7+end
8+
9+class Pokemon
10+ include JSON::Serializable
11+
12+ property avg_spawns : Float64
13+
14+ property candy : String
15+
16+ property candy_count : Int64?
17+
18+ property egg : String
19+
20+ property height : String
21+
22+ property id : Int64
23+
24+ property img : String
25+
26+ property multipliers : Array(Float64)?
27+
28+ property name : String
29+
30+ property next_evolution : Array(Evolution)?
31+
32+ property num : String
33+
34+ @[JSON::Field(key: "type")]
35+ property pokemon_type : Array(String)
36+
37+ property prev_evolution : Array(Evolution)?
38+
39+ property spawn_chance : Float64
40+
41+ property spawn_time : String
42+
43+ property weaknesses : Array(String)
44+
45+ property weight : String
46+end
47+
48+class Evolution
49+ include JSON::Serializable
50+
51+ property name : String
52+
53+ property num : String
54+end
Test case

test/inputs/json/samples/reddit.json

1 generated file · +216 −0
Acrystaldefault / TopLevel.cr+216 −0
@@ -0,0 +1,216 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : TopLevelData
7+
8+ property kind : String
9+end
10+
11+class TopLevelData
12+ include JSON::Serializable
13+
14+ property after : String
15+
16+ property before : Nil
17+
18+ property children : Array(Child)
19+
20+ property modhash : String
21+end
22+
23+class Child
24+ include JSON::Serializable
25+
26+ property data : ChildData
27+
28+ property kind : String
29+end
30+
31+class ChildData
32+ include JSON::Serializable
33+
34+ property approved_at_utc : Nil
35+
36+ property approved_by : Nil
37+
38+ property archived : Bool
39+
40+ property author : String
41+
42+ property author_flair_css_class : String?
43+
44+ property author_flair_text : String?
45+
46+ property banned_at_utc : Nil
47+
48+ property banned_by : Nil
49+
50+ property brand_safe : Bool
51+
52+ property can_gild : Bool
53+
54+ property can_mod_post : Bool
55+
56+ property clicked : Bool
57+
58+ property contest_mode : Bool
59+
60+ property created : Int64
61+
62+ property created_utc : Int64
63+
64+ property distinguished : String?
65+
66+ property domain : String
67+
68+ property downs : Int64
69+
70+ property edited : Bool
71+
72+ property gilded : Int64
73+
74+ property hidden : Bool
75+
76+ property hide_score : Bool
77+
78+ property id : String
79+
80+ property is_self : Bool
81+
82+ property is_video : Bool
83+
84+ property likes : Nil
85+
86+ property link_flair_css_class : String?
87+
88+ property link_flair_text : String?
89+
90+ property locked : Bool
91+
92+ property media : Nil
93+
94+ property media_embed : MediaEmbed
95+
96+ property mod_reports : Array(JSON::Any?)
97+
98+ property name : String
99+
100+ property num_comments : Int64
101+
102+ property num_reports : Nil
103+
104+ property over_18 : Bool
105+
106+ property parent_whitelist_status : String
107+
108+ property permalink : String
109+
110+ property post_hint : String
111+
112+ property preview : Preview
113+
114+ property quarantine : Bool
115+
116+ property removal_reason : Nil
117+
118+ property report_reasons : Nil
119+
120+ property saved : Bool
121+
122+ property score : Int64
123+
124+ property secure_media : Nil
125+
126+ property secure_media_embed : MediaEmbed
127+
128+ property selftext : String
129+
130+ property selftext_html : Nil
131+
132+ property spoiler : Bool
133+
134+ property stickied : Bool
135+
136+ property subreddit : String
137+
138+ property subreddit_id : String
139+
140+ property subreddit_name_prefixed : String
141+
142+ property subreddit_type : String
143+
144+ property suggested_sort : Nil
145+
146+ property thumbnail : String
147+
148+ property thumbnail_height : Int64
149+
150+ property thumbnail_width : Int64
151+
152+ property title : String
153+
154+ property ups : Int64
155+
156+ property url : String
157+
158+ property user_reports : Array(JSON::Any?)
159+
160+ property view_count : Nil
161+
162+ property visited : Bool
163+
164+ property whitelist_status : String
165+end
166+
167+class MediaEmbed
168+ include JSON::Serializable
169+
170+end
171+
172+class Preview
173+ include JSON::Serializable
174+
175+ property enabled : Bool
176+
177+ property images : Array(Image)
178+end
179+
180+class Image
181+ include JSON::Serializable
182+
183+ property id : String
184+
185+ property resolutions : Array(Source)
186+
187+ property source : Source
188+
189+ property variants : Variants
190+end
191+
192+class Source
193+ include JSON::Serializable
194+
195+ property height : Int64
196+
197+ property url : String
198+
199+ property width : Int64
200+end
201+
202+class Variants
203+ include JSON::Serializable
204+
205+ property gif : Gif?
206+
207+ property mp4 : Gif?
208+end
209+
210+class Gif
211+ include JSON::Serializable
212+
213+ property resolutions : Array(Source)
214+
215+ property source : Source
216+end
Test case

test/inputs/json/samples/simple-object.json

1 generated file · +11 −0
Acrystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property date : Int64
7+
8+ property title : String
9+
10+ property validity : Bool
11+end
Test case

test/inputs/json/samples/spotify-album.json

1 generated file · +138 −0
Acrystaldefault / TopLevel.cr+138 −0
@@ -0,0 +1,138 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property album_type : String
7+
8+ property artists : Array(Artist)
9+
10+ property available_markets : Array(String)
11+
12+ property copyrights : Array(Copyright)
13+
14+ property external_ids : ExternalIds
15+
16+ property external_urls : ExternalUrls
17+
18+ property genres : Array(JSON::Any?)
19+
20+ property href : String
21+
22+ property id : String
23+
24+ property images : Array(Image)
25+
26+ property name : String
27+
28+ property popularity : Int64
29+
30+ property release_date : String
31+
32+ property release_date_precision : String
33+
34+ @[JSON::Field(key: "type")]
35+ property top_level_type : String
36+
37+ property tracks : Tracks
38+
39+ property uri : String
40+end
41+
42+class Artist
43+ include JSON::Serializable
44+
45+ @[JSON::Field(key: "type")]
46+ property artist_type : String
47+
48+ property external_urls : ExternalUrls
49+
50+ property href : String
51+
52+ property id : String
53+
54+ property name : String
55+
56+ property uri : String
57+end
58+
59+class ExternalUrls
60+ include JSON::Serializable
61+
62+ property spotify : String
63+end
64+
65+class Copyright
66+ include JSON::Serializable
67+
68+ @[JSON::Field(key: "type")]
69+ property copyright_type : String
70+
71+ property text : String
72+end
73+
74+class ExternalIds
75+ include JSON::Serializable
76+
77+ property upc : String
78+end
79+
80+class Image
81+ include JSON::Serializable
82+
83+ property height : Int64
84+
85+ property url : String
86+
87+ property width : Int64
88+end
89+
90+class Tracks
91+ include JSON::Serializable
92+
93+ property href : String
94+
95+ property items : Array(Item)
96+
97+ property limit : Int64
98+
99+ property offset : Int64
100+
101+ property previous : Nil
102+
103+ property total : Int64
104+
105+ @[JSON::Field(key: "next")]
106+ property tracks_next : Nil
107+end
108+
109+class Item
110+ include JSON::Serializable
111+
112+ property artists : Array(Artist)
113+
114+ property available_markets : Array(String)
115+
116+ property disc_number : Int64
117+
118+ property duration_ms : Int64
119+
120+ property explicit : Bool
121+
122+ property external_urls : ExternalUrls
123+
124+ property href : String
125+
126+ property id : String
127+
128+ @[JSON::Field(key: "type")]
129+ property item_type : String
130+
131+ property name : String
132+
133+ property preview_url : String
134+
135+ property track_number : Int64
136+
137+ property uri : String
138+end
Test case

test/inputs/json/samples/us-avg-temperatures.json

1 generated file · +29 −0
Acrystaldefault / TopLevel.cr+29 −0
@@ -0,0 +1,29 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property data : Hash(String, Datum)
7+
8+ property description : Description
9+end
10+
11+class Datum
12+ include JSON::Serializable
13+
14+ property anomaly : String
15+
16+ property value : String
17+end
18+
19+class Description
20+ include JSON::Serializable
21+
22+ property base_period : String
23+
24+ property missing : Int64
25+
26+ property title : String
27+
28+ property units : String
29+end
Test case

test/inputs/json/samples/us-senators.json

1 generated file · +119 −0
Acrystaldefault / TopLevel.cr+119 −0
@@ -0,0 +1,119 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property meta : Meta
7+
8+ property objects : Array(ObjectElement)
9+end
10+
11+class Meta
12+ include JSON::Serializable
13+
14+ property limit : Int64
15+
16+ property offset : Int64
17+
18+ property total_count : Int64
19+end
20+
21+class ObjectElement
22+ include JSON::Serializable
23+
24+ property caucus : String?
25+
26+ property congress_numbers : Array(Int64)
27+
28+ property current : Bool
29+
30+ property description : String
31+
32+ property district : Nil
33+
34+ property enddate : String
35+
36+ property extra : Extra
37+
38+ property leadership_title : String?
39+
40+ property party : String
41+
42+ property person : Person
43+
44+ property phone : String
45+
46+ property role_type : String
47+
48+ property role_type_label : String
49+
50+ property senator_class : String
51+
52+ property senator_class_label : String
53+
54+ property senator_rank : String
55+
56+ property senator_rank_label : String
57+
58+ property startdate : String
59+
60+ property state : String
61+
62+ property title : String
63+
64+ property title_long : String
65+
66+ property website : String
67+end
68+
69+class Extra
70+ include JSON::Serializable
71+
72+ property address : String
73+
74+ property contact_form : String
75+
76+ property fax : String?
77+
78+ property office : String
79+
80+ property rss_url : String?
81+end
82+
83+class Person
84+ include JSON::Serializable
85+
86+ property bioguideid : String
87+
88+ property birthday : String
89+
90+ property cspanid : Int64
91+
92+ property firstname : String
93+
94+ property gender : String
95+
96+ property gender_label : String
97+
98+ property lastname : String
99+
100+ property link : String
101+
102+ property middlename : String
103+
104+ property name : String
105+
106+ property namemod : String
107+
108+ property nickname : String
109+
110+ property osid : String
111+
112+ property pvsid : String
113+
114+ property sortname : String
115+
116+ property twitterid : String?
117+
118+ property youtubeid : String?
119+end
Test case

test/inputs/schema/accessors.schema

1 generated file · +18 −0
Aschema-crystaldefault / TopLevel.cr+18 −0
@@ -0,0 +1,18 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "bar")]
7+ property barre : String
8+
9+ @[JSON::Field(key: "enum")]
10+ property enumerification : String
11+
12+ property foo : String
13+
14+ @[JSON::Field(key: "union")]
15+ property unionization : UnionUnion
16+end
17+
18+alias UnionUnion = Float64 | Bool
Test case

test/inputs/schema/any.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : JSON::Any?
7+
8+ property values : Hash(String, JSON::Any?)
9+end
Test case

test/inputs/schema/bool-string.schema

1 generated file · +25 −0
Aschema-crystaldefault / TopLevel.cr+25 −0
@@ -0,0 +1,25 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "arrNullable")]
7+ property arr_nullable : Array(String?)?
8+
9+ @[JSON::Field(key: "arrOne")]
10+ property arr_one : Array(String)?
11+
12+ property nullable : String?
13+
14+ property one : String
15+
16+ property optional : String?
17+
18+ @[JSON::Field(key: "unionWithBool")]
19+ property union_with_bool : UnionWithBool
20+
21+ @[JSON::Field(key: "unionWithBoolAndEnum")]
22+ property union_with_bool_and_enum : UnionWithBool
23+end
24+
25+alias UnionWithBool = Bool | String
Test case

test/inputs/schema/boolean-subschema.schema

1 generated file · +13 −0
Aschema-crystaldefault / TopLevel.cr+13 −0
@@ -0,0 +1,13 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property disallowed : JSON::Any?
7+
8+ property empty : Array(JSON::Any?)
9+
10+ property foo : String
11+
12+ property impossible : JSON::Any?
13+end
Test case

test/inputs/schema/camelCase.schema

1 generated file · +11 −0
Aschema-crystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "myProperty")]
7+ property my_property : String?
8+
9+ @[JSON::Field(key: "secondProperty")]
10+ property second_property : String?
11+end
Test case

test/inputs/schema/class-map-union.schema

1 generated file · +16 −0
Aschema-crystaldefault / TopLevel.cr+16 −0
@@ -0,0 +1,16 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "union")]
7+ property top_level_union : Hash(String, UnionValue)?
8+end
9+
10+class UnionClass
11+ include JSON::Serializable
12+
13+ property quux : Int64?
14+end
15+
16+alias UnionValue = Float64 | Bool | String | UnionClass
Test case

test/inputs/schema/class-with-additional.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property map : Hash(String, Map)?
7+end
8+
9+alias Map = Float64 | Bool
Test case

test/inputs/schema/comment-injection-enum-nested-comment.schema

1 generated file · +11 −0
Aschema-crystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ # Nested enum block comment openers:
7+ # {-
8+ # /*
9+ # This text must remain inside the generated enum documentation comment.
10+ property kind : String
11+end
Test case

test/inputs/schema/comment-injection-enum.schema

1 generated file · +14 −0
Aschema-crystaldefault / TopLevel.cr+14 −0
@@ -0,0 +1,14 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ # Comment delimiters:
7+ # */
8+ # {-
9+ # -}
10+ # """
11+ # }
12+ # }
13+ property kind : String
14+end
Test case

test/inputs/schema/comment-injection-nested-comment.schema

1 generated file · +15 −0
Aschema-crystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+# Nested block comment openers:
4+# {-
5+# /*
6+# This text must remain inside the generated documentation comment.
7+class TopLevel
8+ include JSON::Serializable
9+
10+ # Nested property block comment openers:
11+ # {-
12+ # /*
13+ # This text must remain inside the generated property documentation comment.
14+ property value : String
15+end
Test case

test/inputs/schema/comment-injection.schema

1 generated file · +43 −0
Aschema-crystaldefault / TopLevel.cr+43 −0
@@ -0,0 +1,43 @@
1+require "json"
2+
3+# Comment delimiters:
4+# */
5+# /*
6+# {-
7+# -}
8+# """
9+# </summary> & <br>
10+# }
11+# }
12+# }
13+# }
14+# }
15+class TopLevel
16+ include JSON::Serializable
17+
18+ # Ends with a backslash \
19+ @[JSON::Field(key: "trailingBackslash")]
20+ property trailing_backslash : String?
21+
22+ # Ends with a quote "
23+ @[JSON::Field(key: "trailingQuote")]
24+ property trailing_quote : String?
25+
26+ # Ends with a triple quote """
27+ @[JSON::Field(key: "trailingTripleQuote")]
28+ property trailing_triple_quote : String?
29+
30+ # Property delimiters:
31+ # */
32+ # /*
33+ # {-
34+ # -}
35+ # """
36+ # </summary> & <br>
37+ # }
38+ # }
39+ # }
40+ # }
41+ # }
42+ property value : String
43+end
Test case

test/inputs/schema/constructor.schema

1 generated file · +14 −0
Aschema-crystaldefault / TopLevel.cr+14 −0
@@ -0,0 +1,14 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property constructor : UnionConstructor?
7+end
8+
9+class Constructor
10+ include JSON::Serializable
11+
12+end
13+
14+alias UnionConstructor = Constructor | Float64
Test case

test/inputs/schema/cut-enum.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : Int64
7+end
Test case

test/inputs/schema/date-time-or-string.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property bar : String
7+
8+ property foo : String
9+end
Test case

test/inputs/schema/date-time.schema

1 generated file · +20 −0
Aschema-crystaldefault / TopLevel.cr+20 −0
@@ -0,0 +1,20 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "complex-union-array")]
7+ property complex_union_array : Array(ComplexUnionArray)
8+
9+ property date : String
10+
11+ @[JSON::Field(key: "date-time")]
12+ property date_time : String
13+
14+ property time : String
15+
16+ @[JSON::Field(key: "union-array")]
17+ property union_array : Array(String)
18+end
19+
20+alias ComplexUnionArray = Int64 | String
Test case

test/inputs/schema/default-value.schema

1 generated file · +8 −0
Aschema-crystaldefault / TopLevel.cr+8 −0
@@ -0,0 +1,8 @@
1+require "json"
2+
3+# An object with a scalar default
4+class TopLevel
5+ include JSON::Serializable
6+
7+ property id : Int64
8+end
Test case

test/inputs/schema/description-with-double-quotes.schema

1 generated file · +8 −0
Aschema-crystaldefault / TopLevel.cr+8 −0
@@ -0,0 +1,8 @@
1+require "json"
2+
3+# Cool "stuff"
4+class TopLevel
5+ include JSON::Serializable
6+
7+ property foo : Bool?
8+end
Test case

test/inputs/schema/description.schema

1 generated file · +35 −0
Aschema-crystaldefault / TopLevel.cr+35 −0
@@ -0,0 +1,35 @@
1+require "json"
2+
3+# The top-level class.
4+# Its description has two lines.
5+class TopLevel
6+ include JSON::Serializable
7+
8+ # A pretty boolean
9+ property bar : Bool?
10+
11+ # An enumeration
12+ @[JSON::Field(key: "enum")]
13+ property top_level_enum : String
14+
15+ property foo : Float64?
16+
17+ @[JSON::Field(key: "object-or-string")]
18+ property object_or_string : ObjectOrStringUnion
19+
20+ # Either a number or a string
21+ @[JSON::Field(key: "union")]
22+ property top_level_union : UnionUnion
23+end
24+
25+class ObjectOrStringClass
26+ include JSON::Serializable
27+
28+ # This must not get lost
29+ property prop : Float64
30+end
31+
32+alias ObjectOrStringUnion = ObjectOrStringClass | String
33+
34+# Either a number or a string
35+alias UnionUnion = Float64 | String
Test case

test/inputs/schema/direct-union.schema

1 generated file · +17 −0
Aschema-crystaldefault / TopLevel.cr+17 −0
@@ -0,0 +1,17 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property stuff : Hash(String, Thing)
7+end
8+
9+class Thing
10+ include JSON::Serializable
11+
12+ property optional : Anything?
13+
14+ property required : Anything?
15+end
16+
17+alias Anything = Array(JSON::Any?) | Hash(String, JSON::Any?) | Float64 | Int64 | Bool | String
Test case

test/inputs/schema/empty-object.schema

1 generated file · +3 −0
Aschema-crystaldefault / TopLevel.cr+3 −0
@@ -0,0 +1,3 @@
1+require "json"
2+
3+alias TopLevel = Hash(String, JSON::Any?)
Test case

test/inputs/schema/enum-with-null.schema

1 generated file · +8 −0
Aschema-crystaldefault / TopLevel.cr+8 −0
@@ -0,0 +1,8 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "enum")]
7+ property top_level_enum : String?
8+end
Test case

test/inputs/schema/enum-with-values.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property weekdays : String
7+end
Test case

test/inputs/schema/go-schema-pattern-properties.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property map : Hash(String, Int64)
7+end
Test case

test/inputs/schema/id-no-address.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property item : Int64
7+end
Test case

test/inputs/schema/id-root.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property bar : Int64
7+end
Test case

test/inputs/schema/ie-suffix-singularization.schema

1 generated file · +15 −0
Aschema-crystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property cookies : Array(Cookie)
7+end
8+
9+class Cookie
10+ include JSON::Serializable
11+
12+ property name : String
13+
14+ property value : String
15+end
Test case

test/inputs/schema/implicit-all-of.schema

1 generated file · +11 −0
Aschema-crystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : Int64
7+
8+ property bar : Bool
9+
10+ property quux : String
11+end
Test case

test/inputs/schema/implicit-class-array-union.schema

1 generated file · +15 −0
Aschema-crystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : FooUnion?
7+end
8+
9+class FooClass
10+ include JSON::Serializable
11+
12+ property bar : Int64
13+end
14+
15+alias FooUnion = Float64 | FooClass | Int64 | Array(Int64) | Bool | String
Test case

test/inputs/schema/implicit-one-of.schema

1 generated file · +11 −0
Aschema-crystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : Int64
7+
8+ property bar : Bool?
9+
10+ property quux : String?
11+end
Test case

test/inputs/schema/integer-float-union.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property number : Float64
7+end
Test case

test/inputs/schema/integer-string.schema

1 generated file · +25 −0
Aschema-crystaldefault / TopLevel.cr+25 −0
@@ -0,0 +1,25 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "arrNullable")]
7+ property arr_nullable : Array(String?)?
8+
9+ @[JSON::Field(key: "arrOne")]
10+ property arr_one : Array(String)?
11+
12+ property nullable : String?
13+
14+ property one : String
15+
16+ property optional : String?
17+
18+ @[JSON::Field(key: "unionWithInt")]
19+ property union_with_int : UnionWithInt
20+
21+ @[JSON::Field(key: "unionWithIntAndEnum")]
22+ property union_with_int_and_enum : UnionWithInt
23+end
24+
25+alias UnionWithInt = Int64 | String
Test case

test/inputs/schema/integer-type.schema

1 generated file · +23 −0
Aschema-crystaldefault / TopLevel.cr+23 −0
@@ -0,0 +1,23 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property above_i32_max : Int64
7+
8+ property below_i32_min : Int64
9+
10+ property i32_range : Int64
11+
12+ property large_bounds : Int64
13+
14+ property only_maximum : Int64
15+
16+ property only_minimum : Int64
17+
18+ property small_negative : Int64
19+
20+ property small_positive : Int64
21+
22+ property unbounded : Int64
23+end
Test case

test/inputs/schema/intersection-nested.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property intersection : Float64?
7+end
Test case

test/inputs/schema/intersection.schema

1 generated file · +15 −0
Aschema-crystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property intersection : Intersection?
7+end
8+
9+class Intersection
10+ include JSON::Serializable
11+
12+ property foo : Float64
13+
14+ property bar : String?
15+end
Test case

test/inputs/schema/issue2680-top-level-array.schema

1 generated file · +3 −0
Aschema-crystaldefault / TopLevel.cr+3 −0
@@ -0,0 +1,3 @@
1+require "json"
2+
3+alias TopLevel = Array(Int64)
Test case

test/inputs/schema/keyword-enum.schema

1 generated file · +8 −0
Aschema-crystaldefault / TopLevel.cr+8 −0
@@ -0,0 +1,8 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "enum")]
7+ property top_level_enum : String?
8+end
Test case

test/inputs/schema/light.schema

1 generated file · +18 −0
Aschema-crystaldefault / TopLevel.cr+18 −0
@@ -0,0 +1,18 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "LightParams")]
7+ property light_params : LightParams
8+end
9+
10+class LightParams
11+ include JSON::Serializable
12+
13+ property app_id : String
14+
15+ property outlet_id : String
16+
17+ property rgba : String
18+end
Test case

test/inputs/schema/list.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+# A recursive class type
4+class TopLevel
5+ include JSON::Serializable
6+
7+ @[JSON::Field(key: "next")]
8+ property top_level_next : TopLevel?
9+end
Test case

test/inputs/schema/min-max-items.schema

1 generated file · +21 −0
Aschema-crystaldefault / TopLevel.cr+21 −0
@@ -0,0 +1,21 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "maxOnly")]
7+ property max_only : Array(Int64)
8+
9+ @[JSON::Field(key: "minAndMax")]
10+ property min_and_max : Array(Float64)
11+
12+ @[JSON::Field(key: "minOnly")]
13+ property min_only : Array(String)
14+
15+ property plain : Array(String)
16+
17+ @[JSON::Field(key: "unionItems")]
18+ property union_items : Array(UnionItem)
19+end
20+
21+alias UnionItem = Int64 | String
Test case

test/inputs/schema/minmax-integer.schema

1 generated file · +24 −0
Aschema-crystaldefault / TopLevel.cr+24 −0
@@ -0,0 +1,24 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property free : Int64
7+
8+ property intersection : Int64
9+
10+ property max : Int64
11+
12+ property min : Int64
13+
14+ property minmax : Int64
15+
16+ @[JSON::Field(key: "minMaxIntersection")]
17+ property min_max_intersection : Int64
18+
19+ @[JSON::Field(key: "minMaxUnion")]
20+ property min_max_union : Int64
21+
22+ @[JSON::Field(key: "union")]
23+ property top_level_union : Int64
24+end
Test case

test/inputs/schema/minmax.schema

1 generated file · +24 −0
Aschema-crystaldefault / TopLevel.cr+24 −0
@@ -0,0 +1,24 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property free : Float64
7+
8+ property intersection : Float64
9+
10+ property max : Float64
11+
12+ property min : Float64
13+
14+ property minmax : Float64
15+
16+ @[JSON::Field(key: "minMaxIntersection")]
17+ property min_max_intersection : Float64
18+
19+ @[JSON::Field(key: "minMaxUnion")]
20+ property min_max_union : Float64
21+
22+ @[JSON::Field(key: "union")]
23+ property top_level_union : Float64
24+end
Test case

test/inputs/schema/minmaxlength.schema

1 generated file · +27 −0
Aschema-crystaldefault / TopLevel.cr+27 −0
@@ -0,0 +1,27 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property intersection : String
7+
8+ @[JSON::Field(key: "inUnion")]
9+ property in_union : InUnion
10+
11+ property maxlength : String
12+
13+ property minlength : String
14+
15+ @[JSON::Field(key: "minMaxIntersection")]
16+ property min_max_intersection : String
17+
18+ property minmaxlength : String
19+
20+ @[JSON::Field(key: "minMaxUnion")]
21+ property min_max_union : String
22+
23+ @[JSON::Field(key: "union")]
24+ property top_level_union : String
25+end
26+
27+alias InUnion = Float64 | String
Test case

test/inputs/schema/multi-type-enum.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : FooUnion
7+end
8+
9+alias FooUnion = Float64 | Bool | String
Test case

test/inputs/schema/mutually-recursive.schema

1 generated file · +15 −0
Aschema-crystaldefault / TopLevel.cr+15 −0
@@ -0,0 +1,15 @@
1+require "json"
2+
3+class Bar
4+ include JSON::Serializable
5+
6+ property foo : Foo
7+end
8+
9+class TopLevel
10+ include JSON::Serializable
11+
12+ property bar : Bar?
13+end
14+
15+alias Foo = TopLevel | Array(TopLevel)
Test case

test/inputs/schema/nested-intersection-union.schema

1 generated file · +19 −0
Aschema-crystaldefault / TopLevel.cr+19 −0
@@ -0,0 +1,19 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property input : Array(Item)
7+end
8+
9+class Item
10+ include JSON::Serializable
11+
12+ property content : String?
13+
14+ property id : String?
15+
16+ property output : String?
17+
18+ property summary : String?
19+end
Test case

test/inputs/schema/non-standard-ref.schema

1 generated file · +11 −0
Aschema-crystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property bar : Int64
7+
8+ property foo : Int64
9+
10+ property quux : Bool
11+end
Test case

test/inputs/schema/object-type-required.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : String
7+
8+ property bar : String?
9+end
Test case

test/inputs/schema/optional-any.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property bar : Bool
7+
8+ property foo : JSON::Any?
9+end
Test case

test/inputs/schema/optional-const-ref.schema

1 generated file · +30 −0
Aschema-crystaldefault / TopLevel.cr+30 −0
@@ -0,0 +1,30 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property coordinates : Array(Coordinate)?
7+
8+ property count : Int64?
9+
10+ property label : String?
11+
12+ @[JSON::Field(key: "requiredCoordinates")]
13+ property required_coordinates : Array(Coordinate)
14+
15+ @[JSON::Field(key: "requiredCount")]
16+ property required_count : Int64
17+
18+ @[JSON::Field(key: "requiredLabel")]
19+ property required_label : String
20+
21+ property weight : Float64?
22+end
23+
24+class Coordinate
25+ include JSON::Serializable
26+
27+ property latitude : Float64
28+
29+ property longitude : Float64
30+end
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +20 −0
Aschema-crystaldefault / TopLevel.cr+20 −0
@@ -0,0 +1,20 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "optDouble")]
7+ property opt_double : Float64?
8+
9+ @[JSON::Field(key: "optInt")]
10+ property opt_int : Int64?
11+
12+ @[JSON::Field(key: "optPattern")]
13+ property opt_pattern : String?
14+
15+ @[JSON::Field(key: "optString")]
16+ property opt_string : String?
17+
18+ @[JSON::Field(key: "reqZeroMin")]
19+ property req_zero_min : Int64
20+end
Test case

test/inputs/schema/optional-date-time.schema

1 generated file · +23 −0
Aschema-crystaldefault / TopLevel.cr+23 −0
@@ -0,0 +1,23 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "optional-date")]
7+ property optional_date : String?
8+
9+ @[JSON::Field(key: "optional-date-time")]
10+ property optional_date_time : String?
11+
12+ @[JSON::Field(key: "optional-time")]
13+ property optional_time : String?
14+
15+ @[JSON::Field(key: "required-date")]
16+ property required_date : String
17+
18+ @[JSON::Field(key: "required-date-time")]
19+ property required_date_time : String
20+
21+ @[JSON::Field(key: "required-time")]
22+ property required_time : String
23+end
Test case

test/inputs/schema/optional-enum.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property name : String
7+
8+ property shortcut : String?
9+end
Test case

test/inputs/schema/pattern.schema

1 generated file · +12 −0
Aschema-crystaldefault / TopLevel.cr+12 −0
@@ -0,0 +1,12 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property pattern1 : String
7+
8+ property pattern2 : String
9+
10+ @[JSON::Field(key: "union")]
11+ property top_level_union : String
12+end
Test case

test/inputs/schema/postman-collection.schema

1 generated file · +18 −0
Aschema-crystaldefault / TopLevel.cr+18 −0
@@ -0,0 +1,18 @@
1+require "json"
2+
3+# Postman collection
4+class TopLevel
5+ include JSON::Serializable
6+
7+ property item : Array(TopLevel)?
8+
9+ property name : String?
10+
11+ property response : Array(Response)?
12+end
13+
14+class Response
15+ include JSON::Serializable
16+
17+ property body : String?
18+end
Test case

test/inputs/schema/prefix-items.schema

1 generated file · +11 −0
Aschema-crystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property open : Array(Open)
7+
8+ property tuple : Array(Open)
9+end
10+
11+alias Open = Int64 | Bool
Test case

test/inputs/schema/recursive-union-flattening.schema

1 generated file · +21 −0
Aschema-crystaldefault / TopLevel.cr+21 −0
@@ -0,0 +1,21 @@
1+require "json"
2+
3+class TopLevelClass
4+ include JSON::Serializable
5+
6+ property x : X?
7+end
8+
9+class XClass
10+ include JSON::Serializable
11+
12+ property x : X?
13+end
14+
15+alias TopLevel = Hash(String, JSON::Any?) | Float64 | Int64 | Bool | String | Array(TopLevelElement?)
16+
17+alias TopLevelElement = Array(JSON::Any?) | Float64 | Bool | String | TopLevelClass
18+
19+alias XElement = Array(JSON::Any?) | Float64 | Bool | String | XClass
20+
21+alias X = Hash(String, JSON::Any?) | Float64 | Bool | String | Array(XElement?)
Test case

test/inputs/schema/ref-id-files.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : Int64
7+end
Test case

test/inputs/schema/ref-remote.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+# A recursive class type
4+class TopLevel
5+ include JSON::Serializable
6+
7+ @[JSON::Field(key: "next")]
8+ property top_level_next : TopLevel?
9+end
Test case

test/inputs/schema/renaming-bug.schema

1 generated file · +127 −0
Aschema-crystaldefault / TopLevel.cr+127 −0
@@ -0,0 +1,127 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property version : String?
7+
8+ property fruits : Array(Fruit)?
9+
10+ property vehicles : Array(Vehicle)?
11+end
12+
13+class Fruit
14+ include JSON::Serializable
15+
16+ property apple : Bool?
17+
18+ property berries : Array(Berry)?
19+
20+ property orange : Bool?
21+end
22+
23+class Berry
24+ include JSON::Serializable
25+
26+ property color : Color?
27+
28+ property name : String?
29+
30+ property shapes : Array(Shape)?
31+end
32+
33+class Color
34+ include JSON::Serializable
35+
36+ property rgb : Float64?
37+end
38+
39+class Shape
40+ include JSON::Serializable
41+
42+ property geometry : Geometry?
43+
44+ property history : History?
45+end
46+
47+class Geometry
48+ include JSON::Serializable
49+
50+ @[JSON::Field(key: "rectShape")]
51+ property rect_shape : RectShape?
52+
53+ @[JSON::Field(key: "circularShape")]
54+ property circular_shape : Array(CircularShape)?
55+end
56+
57+class CircularShape
58+ include JSON::Serializable
59+
60+ @[JSON::Field(key: "shapeName")]
61+ property shape_name : String?
62+end
63+
64+class RectShape
65+ include JSON::Serializable
66+
67+ property parts : Array(Part)?
68+end
69+
70+class Part
71+ include JSON::Serializable
72+
73+ property depth : String?
74+
75+ property length : String?
76+
77+ property width : String?
78+end
79+
80+class History
81+ include JSON::Serializable
82+
83+ @[JSON::Field(key: "class")]
84+ property history_class : String?
85+end
86+
87+class Vehicle
88+ include JSON::Serializable
89+
90+ property brand : String?
91+
92+ property id : String?
93+
94+ property speed : Speed?
95+
96+ @[JSON::Field(key: "subModule")]
97+ property sub_module : Bool?
98+
99+ @[JSON::Field(key: "type")]
100+ property vehicle_type : VehicleType?
101+
102+ property year : String?
103+end
104+
105+class Speed
106+ include JSON::Serializable
107+
108+ property velocity : Limit?
109+end
110+
111+class Limit
112+ include JSON::Serializable
113+
114+ property maximum : Float64?
115+
116+ property minimum : Float64?
117+end
118+
119+class VehicleType
120+ include JSON::Serializable
121+
122+ property name : String?
123+
124+ property width : String?
125+
126+ property length : String?
127+end
Test case

test/inputs/schema/required-draft3.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property longitude : Float64
7+end
Test case

test/inputs/schema/required-non-properties.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : Int64
7+
8+ property bar : JSON::Any?
9+end
Test case

test/inputs/schema/required.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property longitude : Float64
7+end
Test case

test/inputs/schema/rust-cycle-breaker-union.schema

1 generated file · +21 −0
Aschema-crystaldefault / TopLevel.cr+21 −0
@@ -0,0 +1,21 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "next")]
7+ property top_level_next : Next?
8+
9+ property value : String
10+end
11+
12+class Node
13+ include JSON::Serializable
14+
15+ @[JSON::Field(key: "next")]
16+ property node_next : Next?
17+
18+ property value : String
19+end
20+
21+alias Next = Node | String
Test case

test/inputs/schema/schema-constraints.schema

1 generated file · +10 −0
Aschema-crystaldefault / TopLevel.cr+10 −0
@@ -0,0 +1,10 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "minMaxLength")]
7+ property min_max_length : String
8+
9+ property percent : Float64
10+end
Test case

test/inputs/schema/simple-ref.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+# A recursive class type
4+class TopLevel
5+ include JSON::Serializable
6+
7+ @[JSON::Field(key: "next")]
8+ property top_level_next : TopLevel?
9+end
Test case

test/inputs/schema/strict-optional.schema

1 generated file · +7 −0
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property foo : Float64?
7+end
Test case

test/inputs/schema/top-level-array.schema

1 generated file · +11 −0
Aschema-crystaldefault / TopLevel.cr+11 −0
@@ -0,0 +1,11 @@
1+require "json"
2+
3+alias TopLevel = Array(TextClassificationOutputElement)
4+
5+class TextClassificationOutputElement
6+ include JSON::Serializable
7+
8+ property label : String
9+
10+ property score : Float64
11+end
Test case

test/inputs/schema/top-level-primitive-array.schema

1 generated file · +3 −0
Aschema-crystaldefault / TopLevel.cr+3 −0
@@ -0,0 +1,3 @@
1+require "json"
2+
3+alias TopLevel = Array(String)
Test case

test/inputs/schema/top-level-primitive.schema

1 generated file · +3 −0
Aschema-crystaldefault / TopLevel.cr+3 −0
@@ -0,0 +1,3 @@
1+require "json"
2+
3+alias TopLevel = Float64
Test case

test/inputs/schema/tuple.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property tuple : Array(TupleElement)
7+end
8+
9+alias TupleElement = Int64 | Bool
Test case

test/inputs/schema/unevaluated-properties.schema

1 generated file · +32 −0
Aschema-crystaldefault / TopLevel.cr+32 −0
@@ -0,0 +1,32 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property config : Config?
7+end
8+
9+class Config
10+ include JSON::Serializable
11+
12+ property closed : Closed?
13+
14+ property name : String?
15+
16+ property settings : Hash(String, Array(Item))?
17+end
18+
19+class ClosedClass
20+ include JSON::Serializable
21+
22+end
23+
24+class Item
25+ include JSON::Serializable
26+
27+ property key : String
28+
29+ property value : String
30+end
31+
32+alias Closed = Array(JSON::Any?) | ClosedClass | Float64 | Int64 | Bool | String
Test case

test/inputs/schema/union-int-double.schema

1 generated file · +9 −0
Aschema-crystaldefault / TopLevel.cr+9 −0
@@ -0,0 +1,9 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property value : ValueUnion
7+end
8+
9+alias ValueUnion = Float64 | String
Test case

test/inputs/schema/union-list.schema

1 generated file · +16 −0
Aschema-crystaldefault / TopLevel.cr+16 −0
@@ -0,0 +1,16 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property list : UnionList
7+end
8+
9+class UnionListClass
10+ include JSON::Serializable
11+
12+ @[JSON::Field(key: "next")]
13+ property union_list_next : UnionList
14+end
15+
16+alias UnionList = Float64 | UnionListClass
Test case

test/inputs/schema/union.schema

1 generated file · +13 −0
Aschema-crystaldefault / TopLevel.cr+13 −0
@@ -0,0 +1,13 @@
1+require "json"
2+
3+alias TopLevel = Array(TopLevelElement)
4+
5+class TopLevelElement
6+ include JSON::Serializable
7+
8+ property one : Int64?
9+
10+ property two : Bool
11+
12+ property three : Float64?
13+end
Test case

test/inputs/schema/uuid.schema

1 generated file · +20 −0
Aschema-crystaldefault / TopLevel.cr+20 −0
@@ -0,0 +1,20 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "arrNullable")]
7+ property arr_nullable : Array(String?)?
8+
9+ @[JSON::Field(key: "arrOne")]
10+ property arr_one : Array(String)?
11+
12+ property nullable : String?
13+
14+ property one : String
15+
16+ property optional : String?
17+
18+ @[JSON::Field(key: "unionWithEnum")]
19+ property union_with_enum : String
20+end
Test case

test/inputs/schema/vega-lite.schema

1 generated file · +5,057 −0
Aschema-crystaldefault / TopLevel.cr+5,057 −0
@@ -0,0 +1,5057 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ # URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you
7+ # have a reason to change this, use `https://vega.github.io/schema/vega-lite/v2.json`.
8+ # Setting the `$schema` property allows automatic validation and autocomplete in editors
9+ # that support JSON schema.
10+ @[JSON::Field(key: "$schema")]
11+ property schema : String?
12+
13+ # Sets how the visualization size should be determined. If a string, should be one of
14+ # `"pad"`, `"fit"` or `"none"`.
15+ # Object values can additionally specify parameters for content sizing and automatic
16+ # resizing.
17+ # `"fit"` is only supported for single and layered views that don't use `rangeStep`.
18+ #
19+ # __Default value__: `pad`
20+ property autosize : Autosize?
21+
22+ # CSS color property to use as the background of visualization.
23+ #
24+ # __Default value:__ none (transparent)
25+ property background : String?
26+
27+ # Vega-Lite configuration object. This property can only be defined at the top-level of a
28+ # specification.
29+ property config : Config?
30+
31+ # An object describing the data source
32+ property data : Data?
33+
34+ # Description of this mark for commenting purpose.
35+ property description : String?
36+
37+ # A key-value mapping between encoding channels and definition of fields.
38+ property encoding : EncodingWithFacet?
39+
40+ # The height of a visualization.
41+ #
42+ # __Default value:__
43+ # - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its y-channel has a
44+ # [continuous scale](scale.html#continuous), the height will be the value of
45+ # [`config.view.height`](spec.html#config).
46+ # - For y-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric
47+ # value or unspecified, the height is [determined by the range step, paddings, and the
48+ # cardinality of the field mapped to y-channel](scale.html#band). Otherwise, if the
49+ # `rangeStep` is `null`, the height will be the value of
50+ # [`config.view.height`](spec.html#config).
51+ # - If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.
52+ #
53+ # __Note__: For plots with [`row` and `column` channels](encoding.html#facet), this
54+ # represents the height of a single view.
55+ #
56+ # __See also:__ The documentation for [width and height](size.html) contains more examples.
57+ property height : Float64?
58+
59+ # A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
60+ # `"line"`,
61+ # * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition
62+ # object](mark.html#mark-def).
63+ property mark : AnyMark?
64+
65+ # Name of the visualization for later reference.
66+ property name : String?
67+
68+ # The default visualization padding, in pixels, from the edge of the visualization canvas
69+ # to the data rectangle. If a number, specifies padding for all sides.
70+ # If an object, the value should have the format `{"left": 5, "top": 5, "right": 5,
71+ # "bottom": 5}` to specify padding for each side of the visualization.
72+ #
73+ # __Default value__: `5`
74+ property padding : Padding?
75+
76+ # An object defining properties of geographic projection.
77+ #
78+ # Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or
79+ # more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`.
80+ property projection : Projection?
81+
82+ # A key-value mapping between selection names and definitions.
83+ property selection : Hash(String, SelectionDef)?
84+
85+ # Title for the plot.
86+ property title : Title?
87+
88+ # An array of data transformations such as filter and new field calculation.
89+ property transform : Array(Transform)?
90+
91+ # The width of a visualization.
92+ #
93+ # __Default value:__ This will be determined by the following rules:
94+ #
95+ # - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its x-channel has a
96+ # [continuous scale](scale.html#continuous), the width will be the value of
97+ # [`config.view.width`](spec.html#config).
98+ # - For x-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric
99+ # value or unspecified, the width is [determined by the range step, paddings, and the
100+ # cardinality of the field mapped to x-channel](scale.html#band). Otherwise, if the
101+ # `rangeStep` is `null`, the width will be the value of
102+ # [`config.view.width`](spec.html#config).
103+ # - If no field is mapped to `x` channel, the `width` will be the value of
104+ # [`config.scale.textXRangeStep`](size.html#default-width-and-height) for `text` mark and
105+ # the value of `rangeStep` for other marks.
106+ #
107+ # __Note:__ For plots with [`row` and `column` channels](encoding.html#facet), this
108+ # represents the width of a single view.
109+ #
110+ # __See also:__ The documentation for [width and height](size.html) contains more examples.
111+ property width : Float64?
112+
113+ # Layer or single view specifications to be layered.
114+ #
115+ # __Note__: Specifications inside `layer` cannot use `row` and `column` channels as
116+ # layering facet specifications is not allowed.
117+ property layer : Array(LayerSpec)?
118+
119+ # Scale, axis, and legend resolutions for layers.
120+ #
121+ # Scale, axis, and legend resolutions for facets.
122+ #
123+ # Scale and legend resolutions for repeated charts.
124+ #
125+ # Scale, axis, and legend resolutions for vertically concatenated charts.
126+ #
127+ # Scale, axis, and legend resolutions for horizontally concatenated charts.
128+ property resolve : Resolve?
129+
130+ # An object that describes mappings between `row` and `column` channels and their field
131+ # definitions.
132+ property facet : FacetMapping?
133+
134+ # A specification of the view that gets faceted.
135+ property spec : SpecElement?
136+
137+ # An object that describes what fields should be repeated into views that are laid out as a
138+ # `row` or `column`.
139+ property repeat : Repeat?
140+
141+ # A list of views that should be concatenated and put into a column.
142+ property vconcat : Array(SpecElement)?
143+
144+ # A list of views that should be concatenated and put into a row.
145+ property hconcat : Array(SpecElement)?
146+end
147+
148+class AutoSizeParams
149+ include JSON::Serializable
150+
151+ # Determines how size calculation should be performed, one of `"content"` or `"padding"`.
152+ # The default setting (`"content"`) interprets the width and height settings as the data
153+ # rectangle (plotting) dimensions, to which padding is then added. In contrast, the
154+ # `"padding"` setting includes the padding within the view size calculations, such that the
155+ # width and height settings indicate the **total** intended size of the view.
156+ #
157+ # __Default value__: `"content"`
158+ property contains : String?
159+
160+ # A boolean flag indicating if autosize layout should be re-calculated on every view
161+ # update.
162+ #
163+ # __Default value__: `false`
164+ property resize : Bool?
165+
166+ # The sizing format type. One of `"pad"`, `"fit"` or `"none"`. See the [autosize
167+ # type](https://vega.github.io/vega-lite/docs/size.html#autosize) documentation for
168+ # descriptions of each.
169+ #
170+ # __Default value__: `"pad"`
171+ @[JSON::Field(key: "type")]
172+ property auto_size_params_type : String?
173+end
174+
175+# Vega-Lite configuration object. This property can only be defined at the top-level of a
176+# specification.
177+class Config
178+ include JSON::Serializable
179+
180+ # Area-Specific Config
181+ property area : MarkConfig?
182+
183+ # Sets how the visualization size should be determined. If a string, should be one of
184+ # `"pad"`, `"fit"` or `"none"`.
185+ # Object values can additionally specify parameters for content sizing and automatic
186+ # resizing.
187+ # `"fit"` is only supported for single and layered views that don't use `rangeStep`.
188+ #
189+ # __Default value__: `pad`
190+ property autosize : Autosize?
191+
192+ # Axis configuration, which determines default properties for all `x` and `y`
193+ # [axes](axis.html). For a full list of axis configuration options, please see the
194+ # [corresponding section of the axis documentation](axis.html#config).
195+ property axis : AxisConfig?
196+
197+ # Specific axis config for axes with "band" scales.
198+ @[JSON::Field(key: "axisBand")]
199+ property axis_band : VgAxisConfig?
200+
201+ # Specific axis config for x-axis along the bottom edge of the chart.
202+ @[JSON::Field(key: "axisBottom")]
203+ property axis_bottom : VgAxisConfig?
204+
205+ # Specific axis config for y-axis along the left edge of the chart.
206+ @[JSON::Field(key: "axisLeft")]
207+ property axis_left : VgAxisConfig?
208+
209+ # Specific axis config for y-axis along the right edge of the chart.
210+ @[JSON::Field(key: "axisRight")]
211+ property axis_right : VgAxisConfig?
212+
213+ # Specific axis config for x-axis along the top edge of the chart.
214+ @[JSON::Field(key: "axisTop")]
215+ property axis_top : VgAxisConfig?
216+
217+ # X-axis specific config.
218+ @[JSON::Field(key: "axisX")]
219+ property axis_x : VgAxisConfig?
220+
221+ # Y-axis specific config.
222+ @[JSON::Field(key: "axisY")]
223+ property axis_y : VgAxisConfig?
224+
225+ # CSS color property to use as the background of visualization.
226+ #
227+ # __Default value:__ none (transparent)
228+ property background : String?
229+
230+ # Bar-Specific Config
231+ property bar : BarConfig?
232+
233+ # Circle-Specific Config
234+ property circle : MarkConfig?
235+
236+ # Default axis and legend title for count fields.
237+ #
238+ # __Default value:__ `'Number of Records'`.
239+ @[JSON::Field(key: "countTitle")]
240+ property count_title : String?
241+
242+ # Defines how Vega-Lite generates title for fields. There are three possible styles:
243+ #
244+ # - `"verbal"` (Default) - displays function in a verbal style (e.g., "Sum of field",
245+ # "Year-month of date", "field (binned)").
246+ # - `"function"` - displays function using parentheses and capitalized texts (e.g.,
247+ # "SUM(field)", "YEARMONTH(date)", "BIN(field)").
248+ # - `"plain"` - displays only the field name without functions (e.g., "field", "date",
249+ # "field").
250+ @[JSON::Field(key: "fieldTitle")]
251+ property field_title : String?
252+
253+ # Geoshape-Specific Config
254+ property geoshape : MarkConfig?
255+
256+ # Defines how Vega-Lite should handle invalid values (`null` and `NaN`).
257+ # - If set to `"filter"` (default), all data items with null values are filtered.
258+ # - If `null`, all data items are included. In this case, invalid values will be
259+ # interpreted as zeroes.
260+ @[JSON::Field(key: "invalidValues")]
261+ property invalid_values : String?
262+
263+ # Legend configuration, which determines default properties for all [legends](legend.html).
264+ # For a full list of legend configuration options, please see the [corresponding section of
265+ # in the legend documentation](legend.html#config).
266+ property legend : LegendConfig?
267+
268+ # Line-Specific Config
269+ property line : MarkConfig?
270+
271+ # Mark Config
272+ property mark : MarkConfig?
273+
274+ # D3 Number format for axis labels and text tables. For example "s" for SI units. Use [D3's
275+ # number format pattern](https://github.com/d3/d3-format#locale_format).
276+ @[JSON::Field(key: "numberFormat")]
277+ property number_format : String?
278+
279+ # The default visualization padding, in pixels, from the edge of the visualization canvas
280+ # to the data rectangle. If a number, specifies padding for all sides.
281+ # If an object, the value should have the format `{"left": 5, "top": 5, "right": 5,
282+ # "bottom": 5}` to specify padding for each side of the visualization.
283+ #
284+ # __Default value__: `5`
285+ property padding : Padding?
286+
287+ # Point-Specific Config
288+ property point : MarkConfig?
289+
290+ # Projection configuration, which determines default properties for all
291+ # [projections](projection.html). For a full list of projection configuration options,
292+ # please see the [corresponding section of the projection
293+ # documentation](projection.html#config).
294+ property projection : ProjectionConfig?
295+
296+ # An object hash that defines default range arrays or schemes for using with scales.
297+ # For a full list of scale range configuration options, please see the [corresponding
298+ # section of the scale documentation](scale.html#config).
299+ property range : Hash(String, RangeConfigValue)?
300+
301+ # Rect-Specific Config
302+ property rect : MarkConfig?
303+
304+ # Rule-Specific Config
305+ property rule : MarkConfig?
306+
307+ # Scale configuration determines default properties for all [scales](scale.html). For a
308+ # full list of scale configuration options, please see the [corresponding section of the
309+ # scale documentation](scale.html#config).
310+ property scale : ScaleConfig?
311+
312+ # An object hash for defining default properties for each type of selections.
313+ property selection : SelectionConfig?
314+
315+ # Square-Specific Config
316+ property square : MarkConfig?
317+
318+ # Default stack offset for stackable mark.
319+ property stack : String?
320+
321+ # An object hash that defines key-value mappings to determine default properties for marks
322+ # with a given [style](mark.html#mark-def). The keys represent styles names; the value are
323+ # valid [mark configuration objects](mark.html#config).
324+ property style : Hash(String, VgMarkConfig)?
325+
326+ # Text-Specific Config
327+ property text : TextConfig?
328+
329+ # Tick-Specific Config
330+ property tick : TickConfig?
331+
332+ # Default datetime format for axis and legend labels. The format can be set directly on
333+ # each axis and legend. Use [D3's time format
334+ # pattern](https://github.com/d3/d3-time-format#locale_format).
335+ #
336+ # __Default value:__ `'%b %d, %Y'`.
337+ @[JSON::Field(key: "timeFormat")]
338+ property time_format : String?
339+
340+ # Title configuration, which determines default properties for all [titles](title.html).
341+ # For a full list of title configuration options, please see the [corresponding section of
342+ # the title documentation](title.html#config).
343+ property title : VgTitleConfig?
344+
345+ # Default properties for [single view plots](spec.html#single).
346+ property view : ViewConfig?
347+end
348+
349+# Area-Specific Config
350+#
351+# Circle-Specific Config
352+#
353+# Geoshape-Specific Config
354+#
355+# Line-Specific Config
356+#
357+# Mark Config
358+#
359+# Point-Specific Config
360+#
361+# Rect-Specific Config
362+#
363+# Rule-Specific Config
364+#
365+# Square-Specific Config
366+class MarkConfig
367+ include JSON::Serializable
368+
369+ # The horizontal alignment of the text. One of `"left"`, `"right"`, `"center"`.
370+ property align : String?
371+
372+ # The rotation angle of the text, in degrees.
373+ property angle : Float64?
374+
375+ # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
376+ #
377+ # __Default value:__ `"middle"`
378+ property baseline : String?
379+
380+ # Default color. Note that `fill` and `stroke` have higher precedence than `color` and
381+ # will override `color`.
382+ #
383+ # __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
384+ #
385+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
386+ property color : String?
387+
388+ # The mouse cursor used over the mark. Any valid [CSS cursor
389+ # type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
390+ property cursor : String?
391+
392+ # The horizontal offset, in pixels, between the text label and its anchor point. The offset
393+ # is applied after rotation by the _angle_ property.
394+ property dx : Float64?
395+
396+ # The vertical offset, in pixels, between the text label and its anchor point. The offset
397+ # is applied after rotation by the _angle_ property.
398+ property dy : Float64?
399+
400+ # Default Fill Color. This has higher precedence than config.color
401+ #
402+ # __Default value:__ (None)
403+ property fill : String?
404+
405+ # Whether the mark's color should be used as fill color instead of stroke color.
406+ #
407+ # __Default value:__ `true` for all marks except `point` and `false` for `point`.
408+ #
409+ # __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
410+ #
411+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
412+ property filled : Bool?
413+
414+ # The fill opacity (value between [0,1]).
415+ #
416+ # __Default value:__ `1`
417+ @[JSON::Field(key: "fillOpacity")]
418+ property fill_opacity : Float64?
419+
420+ # The typeface to set the text in (e.g., `"Helvetica Neue"`).
421+ property font : String?
422+
423+ # The font size, in pixels.
424+ @[JSON::Field(key: "fontSize")]
425+ property font_size : Float64?
426+
427+ # The font style (e.g., `"italic"`).
428+ @[JSON::Field(key: "fontStyle")]
429+ property font_style : String?
430+
431+ # The font weight (e.g., `"bold"`).
432+ @[JSON::Field(key: "fontWeight")]
433+ property font_weight : FontWeightUnion?
434+
435+ # A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
436+ property href : String?
437+
438+ # The line interpolation method to use for line and area marks. One of the following:
439+ # - `"linear"`: piecewise linear segments, as in a polyline.
440+ # - `"linear-closed"`: close the linear segments to form a polygon.
441+ # - `"step"`: alternate between horizontal and vertical segments, as in a step function.
442+ # - `"step-before"`: alternate between vertical and horizontal segments, as in a step
443+ # function.
444+ # - `"step-after"`: alternate between horizontal and vertical segments, as in a step
445+ # function.
446+ # - `"basis"`: a B-spline, with control point duplication on the ends.
447+ # - `"basis-open"`: an open B-spline; may not intersect the start or end.
448+ # - `"basis-closed"`: a closed B-spline, as in a loop.
449+ # - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
450+ # - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
451+ # will intersect other control points.
452+ # - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
453+ # - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
454+ # spline.
455+ # - `"monotone"`: cubic interpolation that preserves monotonicity in y.
456+ property interpolate : String?
457+
458+ # The maximum length of the text mark in pixels (default 0, indicating no limit). The text
459+ # value will be automatically truncated if the rendered size exceeds the limit.
460+ property limit : Float64?
461+
462+ # The overall opacity (value between [0,1]).
463+ #
464+ # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
465+ # `square` marks or layered `bar` charts and `1` otherwise.
466+ property opacity : Float64?
467+
468+ # The orientation of a non-stacked bar, tick, area, and line charts.
469+ # The value is either horizontal (default) or vertical.
470+ # - For bar, rule and tick, this determines whether the size of the bar and tick
471+ # should be applied to x or y dimension.
472+ # - For area, this property determines the orient property of the Vega output.
473+ # - For line, this property determines the sort order of the points in the line
474+ # if `config.sortLineBy` is not specified.
475+ # For stacked charts, this is always determined by the orientation of the stack;
476+ # therefore explicitly specified value will be ignored.
477+ property orient : String?
478+
479+ # Polar coordinate radial offset, in pixels, of the text label from the origin determined
480+ # by the `x` and `y` properties.
481+ property radius : Float64?
482+
483+ # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
484+ # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
485+ #
486+ # __Default value:__ `"circle"`
487+ property shape : String?
488+
489+ # The pixel area each the point/circle/square.
490+ # For example: in the case of circles, the radius is determined in part by the square root
491+ # of the size value.
492+ #
493+ # __Default value:__ `30`
494+ property size : Float64?
495+
496+ # Default Stroke Color. This has higher precedence than config.color
497+ #
498+ # __Default value:__ (None)
499+ property stroke : String?
500+
501+ # An array of alternating stroke, space lengths for creating dashed or dotted lines.
502+ @[JSON::Field(key: "strokeDash")]
503+ property stroke_dash : Array(Float64)?
504+
505+ # The offset (in pixels) into which to begin drawing with the stroke dash array.
506+ @[JSON::Field(key: "strokeDashOffset")]
507+ property stroke_dash_offset : Float64?
508+
509+ # The stroke opacity (value between [0,1]).
510+ #
511+ # __Default value:__ `1`
512+ @[JSON::Field(key: "strokeOpacity")]
513+ property stroke_opacity : Float64?
514+
515+ # The stroke width, in pixels.
516+ @[JSON::Field(key: "strokeWidth")]
517+ property stroke_width : Float64?
518+
519+ # Depending on the interpolation type, sets the tension parameter (for line and area marks).
520+ property tension : Float64?
521+
522+ # Placeholder text if the `text` channel is not specified
523+ property text : String?
524+
525+ # Polar coordinate angle, in radians, of the text label from the origin determined by the
526+ # `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark
527+ # `startAngle` and `endAngle` properties: angles are measured in radians, with `0`
528+ # indicating "north".
529+ property theta : Float64?
530+end
531+
532+# Axis configuration, which determines default properties for all `x` and `y`
533+# [axes](axis.html). For a full list of axis configuration options, please see the
534+# [corresponding section of the axis documentation](axis.html#config).
535+class AxisConfig
536+ include JSON::Serializable
537+
538+ # An interpolation fraction indicating where, for `band` scales, axis ticks should be
539+ # positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5`
540+ # places ticks in the middle of their bands.
541+ @[JSON::Field(key: "bandPosition")]
542+ property band_position : Float64?
543+
544+ # A boolean flag indicating if the domain (the axis baseline) should be included as part of
545+ # the axis.
546+ #
547+ # __Default value:__ `true`
548+ property domain : Bool?
549+
550+ # Color of axis domain line.
551+ #
552+ # __Default value:__ (none, using Vega default).
553+ @[JSON::Field(key: "domainColor")]
554+ property domain_color : String?
555+
556+ # Stroke width of axis domain line
557+ #
558+ # __Default value:__ (none, using Vega default).
559+ @[JSON::Field(key: "domainWidth")]
560+ property domain_width : Float64?
561+
562+ # A boolean flag indicating if grid lines should be included as part of the axis
563+ #
564+ # __Default value:__ `true` for [continuous scales](scale.html#continuous) that are not
565+ # binned; otherwise, `false`.
566+ property grid : Bool?
567+
568+ # Color of gridlines.
569+ @[JSON::Field(key: "gridColor")]
570+ property grid_color : String?
571+
572+ # The offset (in pixels) into which to begin drawing with the grid dash array.
573+ @[JSON::Field(key: "gridDash")]
574+ property grid_dash : Array(Float64)?
575+
576+ # The stroke opacity of grid (value between [0,1])
577+ #
578+ # __Default value:__ (`1` by default)
579+ @[JSON::Field(key: "gridOpacity")]
580+ property grid_opacity : Float64?
581+
582+ # The grid width, in pixels.
583+ @[JSON::Field(key: "gridWidth")]
584+ property grid_width : Float64?
585+
586+ # The rotation angle of the axis labels.
587+ #
588+ # __Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.
589+ @[JSON::Field(key: "labelAngle")]
590+ property label_angle : Float64?
591+
592+ # Indicates if labels should be hidden if they exceed the axis range. If `false `(the
593+ # default) no bounds overlap analysis is performed. If `true`, labels will be hidden if
594+ # they exceed the axis range by more than 1 pixel. If this property is a number, it
595+ # specifies the pixel tolerance: the maximum amount by which a label bounding box may
596+ # exceed the axis range.
597+ #
598+ # __Default value:__ `false`.
599+ @[JSON::Field(key: "labelBound")]
600+ property label_bound : Label?
601+
602+ # The color of the tick label, can be in hex color code or regular color name.
603+ @[JSON::Field(key: "labelColor")]
604+ property label_color : String?
605+
606+ # Indicates if the first and last axis labels should be aligned flush with the scale range.
607+ # Flush alignment for a horizontal axis will left-align the first label and right-align the
608+ # last label. For vertical axes, bottom and top text baselines are applied instead. If this
609+ # property is a number, it also indicates the number of pixels by which to offset the first
610+ # and last labels; for example, a value of 2 will flush-align the first and last labels and
611+ # also push them 2 pixels outward from the center of the axis. The additional adjustment
612+ # can sometimes help the labels better visually group with corresponding axis ticks.
613+ #
614+ # __Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.
615+ @[JSON::Field(key: "labelFlush")]
616+ property label_flush : Label?
617+
618+ # The font of the tick label.
619+ @[JSON::Field(key: "labelFont")]
620+ property label_font : String?
621+
622+ # The font size of the label, in pixels.
623+ @[JSON::Field(key: "labelFontSize")]
624+ property label_font_size : Float64?
625+
626+ # Maximum allowed pixel width of axis tick labels.
627+ @[JSON::Field(key: "labelLimit")]
628+ property label_limit : Float64?
629+
630+ # The strategy to use for resolving overlap of axis labels. If `false` (the default), no
631+ # overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing
632+ # every other label is used (this works well for standard linear axes). If set to
633+ # `"greedy"`, a linear scan of the labels is performed, removing any labels that overlaps
634+ # with the last visible label (this often works better for log-scaled axes).
635+ #
636+ # __Default value:__ `true` for non-nominal fields with non-log scales; `"greedy"` for log
637+ # scales; otherwise `false`.
638+ @[JSON::Field(key: "labelOverlap")]
639+ property label_overlap : LabelOverlapUnion?
640+
641+ # The padding, in pixels, between axis and text labels.
642+ @[JSON::Field(key: "labelPadding")]
643+ property label_padding : Float64?
644+
645+ # A boolean flag indicating if labels should be included as part of the axis.
646+ #
647+ # __Default value:__ `true`.
648+ property labels : Bool?
649+
650+ # The maximum extent in pixels that axis ticks and labels should use. This determines a
651+ # maximum offset value for axis titles.
652+ #
653+ # __Default value:__ `undefined`.
654+ @[JSON::Field(key: "maxExtent")]
655+ property max_extent : Float64?
656+
657+ # The minimum extent in pixels that axis ticks and labels should use. This determines a
658+ # minimum offset value for axis titles.
659+ #
660+ # __Default value:__ `30` for y-axis; `undefined` for x-axis.
661+ @[JSON::Field(key: "minExtent")]
662+ property min_extent : Float64?
663+
664+ # Whether month names and weekday names should be abbreviated.
665+ #
666+ # __Default value:__ `false`
667+ @[JSON::Field(key: "shortTimeLabels")]
668+ property short_time_labels : Bool?
669+
670+ # The color of the axis's tick.
671+ @[JSON::Field(key: "tickColor")]
672+ property tick_color : String?
673+
674+ # Boolean flag indicating if pixel position values should be rounded to the nearest integer.
675+ @[JSON::Field(key: "tickRound")]
676+ property tick_round : Bool?
677+
678+ # Boolean value that determines whether the axis should include ticks.
679+ property ticks : Bool?
680+
681+ # The size in pixels of axis ticks.
682+ @[JSON::Field(key: "tickSize")]
683+ property tick_size : Float64?
684+
685+ # The width, in pixels, of ticks.
686+ @[JSON::Field(key: "tickWidth")]
687+ property tick_width : Float64?
688+
689+ # Horizontal text alignment of axis titles.
690+ @[JSON::Field(key: "titleAlign")]
691+ property title_align : String?
692+
693+ # Angle in degrees of axis titles.
694+ @[JSON::Field(key: "titleAngle")]
695+ property title_angle : Float64?
696+
697+ # Vertical text baseline for axis titles.
698+ @[JSON::Field(key: "titleBaseline")]
699+ property title_baseline : String?
700+
701+ # Color of the title, can be in hex color code or regular color name.
702+ @[JSON::Field(key: "titleColor")]
703+ property title_color : String?
704+
705+ # Font of the title. (e.g., `"Helvetica Neue"`).
706+ @[JSON::Field(key: "titleFont")]
707+ property title_font : String?
708+
709+ # Font size of the title.
710+ @[JSON::Field(key: "titleFontSize")]
711+ property title_font_size : Float64?
712+
713+ # Font weight of the title. (e.g., `"bold"`).
714+ @[JSON::Field(key: "titleFontWeight")]
715+ property title_font_weight : TitleFontWeightUnion?
716+
717+ # Maximum allowed pixel width of axis titles.
718+ @[JSON::Field(key: "titleLimit")]
719+ property title_limit : Float64?
720+
721+ # Max length for axis title if the title is automatically generated from the field's
722+ # description.
723+ @[JSON::Field(key: "titleMaxLength")]
724+ property title_max_length : Float64?
725+
726+ # The padding, in pixels, between title and axis.
727+ @[JSON::Field(key: "titlePadding")]
728+ property title_padding : Float64?
729+
730+ # X-coordinate of the axis title relative to the axis group.
731+ @[JSON::Field(key: "titleX")]
732+ property title_x : Float64?
733+
734+ # Y-coordinate of the axis title relative to the axis group.
735+ @[JSON::Field(key: "titleY")]
736+ property title_y : Float64?
737+end
738+
739+# Specific axis config for axes with "band" scales.
740+#
741+# Specific axis config for x-axis along the bottom edge of the chart.
742+#
743+# Specific axis config for y-axis along the left edge of the chart.
744+#
745+# Specific axis config for y-axis along the right edge of the chart.
746+#
747+# Specific axis config for x-axis along the top edge of the chart.
748+#
749+# X-axis specific config.
750+#
751+# Y-axis specific config.
752+class VgAxisConfig
753+ include JSON::Serializable
754+
755+ # An interpolation fraction indicating where, for `band` scales, axis ticks should be
756+ # positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5`
757+ # places ticks in the middle of their bands.
758+ @[JSON::Field(key: "bandPosition")]
759+ property band_position : Float64?
760+
761+ # A boolean flag indicating if the domain (the axis baseline) should be included as part of
762+ # the axis.
763+ #
764+ # __Default value:__ `true`
765+ property domain : Bool?
766+
767+ # Color of axis domain line.
768+ #
769+ # __Default value:__ (none, using Vega default).
770+ @[JSON::Field(key: "domainColor")]
771+ property domain_color : String?
772+
773+ # Stroke width of axis domain line
774+ #
775+ # __Default value:__ (none, using Vega default).
776+ @[JSON::Field(key: "domainWidth")]
777+ property domain_width : Float64?
778+
779+ # A boolean flag indicating if grid lines should be included as part of the axis
780+ #
781+ # __Default value:__ `true` for [continuous scales](scale.html#continuous) that are not
782+ # binned; otherwise, `false`.
783+ property grid : Bool?
784+
785+ # Color of gridlines.
786+ @[JSON::Field(key: "gridColor")]
787+ property grid_color : String?
788+
789+ # The offset (in pixels) into which to begin drawing with the grid dash array.
790+ @[JSON::Field(key: "gridDash")]
791+ property grid_dash : Array(Float64)?
792+
793+ # The stroke opacity of grid (value between [0,1])
794+ #
795+ # __Default value:__ (`1` by default)
796+ @[JSON::Field(key: "gridOpacity")]
797+ property grid_opacity : Float64?
798+
799+ # The grid width, in pixels.
800+ @[JSON::Field(key: "gridWidth")]
801+ property grid_width : Float64?
802+
803+ # The rotation angle of the axis labels.
804+ #
805+ # __Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.
806+ @[JSON::Field(key: "labelAngle")]
807+ property label_angle : Float64?
808+
809+ # Indicates if labels should be hidden if they exceed the axis range. If `false `(the
810+ # default) no bounds overlap analysis is performed. If `true`, labels will be hidden if
811+ # they exceed the axis range by more than 1 pixel. If this property is a number, it
812+ # specifies the pixel tolerance: the maximum amount by which a label bounding box may
813+ # exceed the axis range.
814+ #
815+ # __Default value:__ `false`.
816+ @[JSON::Field(key: "labelBound")]
817+ property label_bound : Label?
818+
819+ # The color of the tick label, can be in hex color code or regular color name.
820+ @[JSON::Field(key: "labelColor")]
821+ property label_color : String?
822+
823+ # Indicates if the first and last axis labels should be aligned flush with the scale range.
824+ # Flush alignment for a horizontal axis will left-align the first label and right-align the
825+ # last label. For vertical axes, bottom and top text baselines are applied instead. If this
826+ # property is a number, it also indicates the number of pixels by which to offset the first
827+ # and last labels; for example, a value of 2 will flush-align the first and last labels and
828+ # also push them 2 pixels outward from the center of the axis. The additional adjustment
829+ # can sometimes help the labels better visually group with corresponding axis ticks.
830+ #
831+ # __Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.
832+ @[JSON::Field(key: "labelFlush")]
833+ property label_flush : Label?
834+
835+ # The font of the tick label.
836+ @[JSON::Field(key: "labelFont")]
837+ property label_font : String?
838+
839+ # The font size of the label, in pixels.
840+ @[JSON::Field(key: "labelFontSize")]
841+ property label_font_size : Float64?
842+
843+ # Maximum allowed pixel width of axis tick labels.
844+ @[JSON::Field(key: "labelLimit")]
845+ property label_limit : Float64?
846+
847+ # The strategy to use for resolving overlap of axis labels. If `false` (the default), no
848+ # overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing
849+ # every other label is used (this works well for standard linear axes). If set to
850+ # `"greedy"`, a linear scan of the labels is performed, removing any labels that overlaps
851+ # with the last visible label (this often works better for log-scaled axes).
852+ #
853+ # __Default value:__ `true` for non-nominal fields with non-log scales; `"greedy"` for log
854+ # scales; otherwise `false`.
855+ @[JSON::Field(key: "labelOverlap")]
856+ property label_overlap : LabelOverlapUnion?
857+
858+ # The padding, in pixels, between axis and text labels.
859+ @[JSON::Field(key: "labelPadding")]
860+ property label_padding : Float64?
861+
862+ # A boolean flag indicating if labels should be included as part of the axis.
863+ #
864+ # __Default value:__ `true`.
865+ property labels : Bool?
866+
867+ # The maximum extent in pixels that axis ticks and labels should use. This determines a
868+ # maximum offset value for axis titles.
869+ #
870+ # __Default value:__ `undefined`.
871+ @[JSON::Field(key: "maxExtent")]
872+ property max_extent : Float64?
873+
874+ # The minimum extent in pixels that axis ticks and labels should use. This determines a
875+ # minimum offset value for axis titles.
876+ #
877+ # __Default value:__ `30` for y-axis; `undefined` for x-axis.
878+ @[JSON::Field(key: "minExtent")]
879+ property min_extent : Float64?
880+
881+ # The color of the axis's tick.
882+ @[JSON::Field(key: "tickColor")]
883+ property tick_color : String?
884+
885+ # Boolean flag indicating if pixel position values should be rounded to the nearest integer.
886+ @[JSON::Field(key: "tickRound")]
887+ property tick_round : Bool?
888+
889+ # Boolean value that determines whether the axis should include ticks.
890+ property ticks : Bool?
891+
892+ # The size in pixels of axis ticks.
893+ @[JSON::Field(key: "tickSize")]
894+ property tick_size : Float64?
895+
896+ # The width, in pixels, of ticks.
897+ @[JSON::Field(key: "tickWidth")]
898+ property tick_width : Float64?
899+
900+ # Horizontal text alignment of axis titles.
901+ @[JSON::Field(key: "titleAlign")]
902+ property title_align : String?
903+
904+ # Angle in degrees of axis titles.
905+ @[JSON::Field(key: "titleAngle")]
906+ property title_angle : Float64?
907+
908+ # Vertical text baseline for axis titles.
909+ @[JSON::Field(key: "titleBaseline")]
910+ property title_baseline : String?
911+
912+ # Color of the title, can be in hex color code or regular color name.
913+ @[JSON::Field(key: "titleColor")]
914+ property title_color : String?
915+
916+ # Font of the title. (e.g., `"Helvetica Neue"`).
917+ @[JSON::Field(key: "titleFont")]
918+ property title_font : String?
919+
920+ # Font size of the title.
921+ @[JSON::Field(key: "titleFontSize")]
922+ property title_font_size : Float64?
923+
924+ # Font weight of the title. (e.g., `"bold"`).
925+ @[JSON::Field(key: "titleFontWeight")]
926+ property title_font_weight : TitleFontWeightUnion?
927+
928+ # Maximum allowed pixel width of axis titles.
929+ @[JSON::Field(key: "titleLimit")]
930+ property title_limit : Float64?
931+
932+ # Max length for axis title if the title is automatically generated from the field's
933+ # description.
934+ @[JSON::Field(key: "titleMaxLength")]
935+ property title_max_length : Float64?
936+
937+ # The padding, in pixels, between title and axis.
938+ @[JSON::Field(key: "titlePadding")]
939+ property title_padding : Float64?
940+
941+ # X-coordinate of the axis title relative to the axis group.
942+ @[JSON::Field(key: "titleX")]
943+ property title_x : Float64?
944+
945+ # Y-coordinate of the axis title relative to the axis group.
946+ @[JSON::Field(key: "titleY")]
947+ property title_y : Float64?
948+end
949+
950+# Bar-Specific Config
951+class BarConfig
952+ include JSON::Serializable
953+
954+ # The horizontal alignment of the text. One of `"left"`, `"right"`, `"center"`.
955+ property align : String?
956+
957+ # The rotation angle of the text, in degrees.
958+ property angle : Float64?
959+
960+ # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
961+ #
962+ # __Default value:__ `"middle"`
963+ property baseline : String?
964+
965+ # Offset between bar for binned field. Ideal value for this is either 0 (Preferred by
966+ # statisticians) or 1 (Vega-Lite Default, D3 example style).
967+ #
968+ # __Default value:__ `1`
969+ @[JSON::Field(key: "binSpacing")]
970+ property bin_spacing : Float64?
971+
972+ # Default color. Note that `fill` and `stroke` have higher precedence than `color` and
973+ # will override `color`.
974+ #
975+ # __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
976+ #
977+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
978+ property color : String?
979+
980+ # The default size of the bars on continuous scales.
981+ #
982+ # __Default value:__ `5`
983+ @[JSON::Field(key: "continuousBandSize")]
984+ property continuous_band_size : Float64?
985+
986+ # The mouse cursor used over the mark. Any valid [CSS cursor
987+ # type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
988+ property cursor : String?
989+
990+ # The size of the bars. If unspecified, the default size is `bandSize-1`,
991+ # which provides 1 pixel offset between bars.
992+ @[JSON::Field(key: "discreteBandSize")]
993+ property discrete_band_size : Float64?
994+
995+ # The horizontal offset, in pixels, between the text label and its anchor point. The offset
996+ # is applied after rotation by the _angle_ property.
997+ property dx : Float64?
998+
999+ # The vertical offset, in pixels, between the text label and its anchor point. The offset
1000+ # is applied after rotation by the _angle_ property.
1001+ property dy : Float64?
1002+
1003+ # Default Fill Color. This has higher precedence than config.color
1004+ #
1005+ # __Default value:__ (None)
1006+ property fill : String?
1007+
1008+ # Whether the mark's color should be used as fill color instead of stroke color.
1009+ #
1010+ # __Default value:__ `true` for all marks except `point` and `false` for `point`.
1011+ #
1012+ # __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
1013+ #
1014+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
1015+ property filled : Bool?
1016+
1017+ # The fill opacity (value between [0,1]).
1018+ #
1019+ # __Default value:__ `1`
1020+ @[JSON::Field(key: "fillOpacity")]
1021+ property fill_opacity : Float64?
1022+
1023+ # The typeface to set the text in (e.g., `"Helvetica Neue"`).
1024+ property font : String?
1025+
1026+ # The font size, in pixels.
1027+ @[JSON::Field(key: "fontSize")]
1028+ property font_size : Float64?
1029+
1030+ # The font style (e.g., `"italic"`).
1031+ @[JSON::Field(key: "fontStyle")]
1032+ property font_style : String?
1033+
1034+ # The font weight (e.g., `"bold"`).
1035+ @[JSON::Field(key: "fontWeight")]
1036+ property font_weight : FontWeightUnion?
1037+
1038+ # A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
1039+ property href : String?
1040+
1041+ # The line interpolation method to use for line and area marks. One of the following:
1042+ # - `"linear"`: piecewise linear segments, as in a polyline.
1043+ # - `"linear-closed"`: close the linear segments to form a polygon.
1044+ # - `"step"`: alternate between horizontal and vertical segments, as in a step function.
1045+ # - `"step-before"`: alternate between vertical and horizontal segments, as in a step
1046+ # function.
1047+ # - `"step-after"`: alternate between horizontal and vertical segments, as in a step
1048+ # function.
1049+ # - `"basis"`: a B-spline, with control point duplication on the ends.
1050+ # - `"basis-open"`: an open B-spline; may not intersect the start or end.
1051+ # - `"basis-closed"`: a closed B-spline, as in a loop.
1052+ # - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
1053+ # - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
1054+ # will intersect other control points.
1055+ # - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
1056+ # - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
1057+ # spline.
1058+ # - `"monotone"`: cubic interpolation that preserves monotonicity in y.
1059+ property interpolate : String?
1060+
1061+ # The maximum length of the text mark in pixels (default 0, indicating no limit). The text
1062+ # value will be automatically truncated if the rendered size exceeds the limit.
1063+ property limit : Float64?
1064+
1065+ # The overall opacity (value between [0,1]).
1066+ #
1067+ # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
1068+ # `square` marks or layered `bar` charts and `1` otherwise.
1069+ property opacity : Float64?
1070+
1071+ # The orientation of a non-stacked bar, tick, area, and line charts.
1072+ # The value is either horizontal (default) or vertical.
1073+ # - For bar, rule and tick, this determines whether the size of the bar and tick
1074+ # should be applied to x or y dimension.
1075+ # - For area, this property determines the orient property of the Vega output.
1076+ # - For line, this property determines the sort order of the points in the line
1077+ # if `config.sortLineBy` is not specified.
1078+ # For stacked charts, this is always determined by the orientation of the stack;
1079+ # therefore explicitly specified value will be ignored.
1080+ property orient : String?
1081+
1082+ # Polar coordinate radial offset, in pixels, of the text label from the origin determined
1083+ # by the `x` and `y` properties.
1084+ property radius : Float64?
1085+
1086+ # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
1087+ # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
1088+ #
1089+ # __Default value:__ `"circle"`
1090+ property shape : String?
1091+
1092+ # The pixel area each the point/circle/square.
1093+ # For example: in the case of circles, the radius is determined in part by the square root
1094+ # of the size value.
1095+ #
1096+ # __Default value:__ `30`
1097+ property size : Float64?
1098+
1099+ # Default Stroke Color. This has higher precedence than config.color
1100+ #
1101+ # __Default value:__ (None)
1102+ property stroke : String?
1103+
1104+ # An array of alternating stroke, space lengths for creating dashed or dotted lines.
1105+ @[JSON::Field(key: "strokeDash")]
1106+ property stroke_dash : Array(Float64)?
1107+
1108+ # The offset (in pixels) into which to begin drawing with the stroke dash array.
1109+ @[JSON::Field(key: "strokeDashOffset")]
1110+ property stroke_dash_offset : Float64?
1111+
1112+ # The stroke opacity (value between [0,1]).
1113+ #
1114+ # __Default value:__ `1`
1115+ @[JSON::Field(key: "strokeOpacity")]
1116+ property stroke_opacity : Float64?
1117+
1118+ # The stroke width, in pixels.
1119+ @[JSON::Field(key: "strokeWidth")]
1120+ property stroke_width : Float64?
1121+
1122+ # Depending on the interpolation type, sets the tension parameter (for line and area marks).
1123+ property tension : Float64?
1124+
1125+ # Placeholder text if the `text` channel is not specified
1126+ property text : String?
1127+
1128+ # Polar coordinate angle, in radians, of the text label from the origin determined by the
1129+ # `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark
1130+ # `startAngle` and `endAngle` properties: angles are measured in radians, with `0`
1131+ # indicating "north".
1132+ property theta : Float64?
1133+end
1134+
1135+# Legend configuration, which determines default properties for all [legends](legend.html).
1136+# For a full list of legend configuration options, please see the [corresponding section of
1137+# in the legend documentation](legend.html#config).
1138+class LegendConfig
1139+ include JSON::Serializable
1140+
1141+ # Corner radius for the full legend.
1142+ @[JSON::Field(key: "cornerRadius")]
1143+ property corner_radius : Float64?
1144+
1145+ # Padding (in pixels) between legend entries in a symbol legend.
1146+ @[JSON::Field(key: "entryPadding")]
1147+ property entry_padding : Float64?
1148+
1149+ # Background fill color for the full legend.
1150+ @[JSON::Field(key: "fillColor")]
1151+ property fill_color : String?
1152+
1153+ # The height of the gradient, in pixels.
1154+ @[JSON::Field(key: "gradientHeight")]
1155+ property gradient_height : Float64?
1156+
1157+ # Text baseline for color ramp gradient labels.
1158+ @[JSON::Field(key: "gradientLabelBaseline")]
1159+ property gradient_label_baseline : String?
1160+
1161+ # The maximum allowed length in pixels of color ramp gradient labels.
1162+ @[JSON::Field(key: "gradientLabelLimit")]
1163+ property gradient_label_limit : Float64?
1164+
1165+ # Vertical offset in pixels for color ramp gradient labels.
1166+ @[JSON::Field(key: "gradientLabelOffset")]
1167+ property gradient_label_offset : Float64?
1168+
1169+ # The color of the gradient stroke, can be in hex color code or regular color name.
1170+ @[JSON::Field(key: "gradientStrokeColor")]
1171+ property gradient_stroke_color : String?
1172+
1173+ # The width of the gradient stroke, in pixels.
1174+ @[JSON::Field(key: "gradientStrokeWidth")]
1175+ property gradient_stroke_width : Float64?
1176+
1177+ # The width of the gradient, in pixels.
1178+ @[JSON::Field(key: "gradientWidth")]
1179+ property gradient_width : Float64?
1180+
1181+ # The alignment of the legend label, can be left, middle or right.
1182+ @[JSON::Field(key: "labelAlign")]
1183+ property label_align : String?
1184+
1185+ # The position of the baseline of legend label, can be top, middle or bottom.
1186+ @[JSON::Field(key: "labelBaseline")]
1187+ property label_baseline : String?
1188+
1189+ # The color of the legend label, can be in hex color code or regular color name.
1190+ @[JSON::Field(key: "labelColor")]
1191+ property label_color : String?
1192+
1193+ # The font of the legend label.
1194+ @[JSON::Field(key: "labelFont")]
1195+ property label_font : String?
1196+
1197+ # The font size of legend label.
1198+ #
1199+ # __Default value:__ `10`.
1200+ @[JSON::Field(key: "labelFontSize")]
1201+ property label_font_size : Float64?
1202+
1203+ # Maximum allowed pixel width of axis tick labels.
1204+ @[JSON::Field(key: "labelLimit")]
1205+ property label_limit : Float64?
1206+
1207+ # The offset of the legend label.
1208+ @[JSON::Field(key: "labelOffset")]
1209+ property label_offset : Float64?
1210+
1211+ # The offset, in pixels, by which to displace the legend from the edge of the enclosing
1212+ # group or data rectangle.
1213+ #
1214+ # __Default value:__ `0`
1215+ property offset : Float64?
1216+
1217+ # The orientation of the legend, which determines how the legend is positioned within the
1218+ # scene. One of "left", "right", "top-left", "top-right", "bottom-left", "bottom-right",
1219+ # "none".
1220+ #
1221+ # __Default value:__ `"right"`
1222+ property orient : String?
1223+
1224+ # The padding, in pixels, between the legend and axis.
1225+ property padding : Float64?
1226+
1227+ # Whether month names and weekday names should be abbreviated.
1228+ #
1229+ # __Default value:__ `false`
1230+ @[JSON::Field(key: "shortTimeLabels")]
1231+ property short_time_labels : Bool?
1232+
1233+ # Border stroke color for the full legend.
1234+ @[JSON::Field(key: "strokeColor")]
1235+ property stroke_color : String?
1236+
1237+ # Border stroke dash pattern for the full legend.
1238+ @[JSON::Field(key: "strokeDash")]
1239+ property stroke_dash : Array(Float64)?
1240+
1241+ # Border stroke width for the full legend.
1242+ @[JSON::Field(key: "strokeWidth")]
1243+ property stroke_width : Float64?
1244+
1245+ # The color of the legend symbol,
1246+ @[JSON::Field(key: "symbolColor")]
1247+ property symbol_color : String?
1248+
1249+ # The size of the legend symbol, in pixels.
1250+ @[JSON::Field(key: "symbolSize")]
1251+ property symbol_size : Float64?
1252+
1253+ # The width of the symbol's stroke.
1254+ @[JSON::Field(key: "symbolStrokeWidth")]
1255+ property symbol_stroke_width : Float64?
1256+
1257+ # Default shape type (such as "circle") for legend symbols.
1258+ @[JSON::Field(key: "symbolType")]
1259+ property symbol_type : String?
1260+
1261+ # Horizontal text alignment for legend titles.
1262+ @[JSON::Field(key: "titleAlign")]
1263+ property title_align : String?
1264+
1265+ # Vertical text baseline for legend titles.
1266+ @[JSON::Field(key: "titleBaseline")]
1267+ property title_baseline : String?
1268+
1269+ # The color of the legend title, can be in hex color code or regular color name.
1270+ @[JSON::Field(key: "titleColor")]
1271+ property title_color : String?
1272+
1273+ # The font of the legend title.
1274+ @[JSON::Field(key: "titleFont")]
1275+ property title_font : String?
1276+
1277+ # The font size of the legend title.
1278+ @[JSON::Field(key: "titleFontSize")]
1279+ property title_font_size : Float64?
1280+
1281+ # The font weight of the legend title.
1282+ @[JSON::Field(key: "titleFontWeight")]
1283+ property title_font_weight : TitleFontWeightUnion?
1284+
1285+ # Maximum allowed pixel width of axis titles.
1286+ @[JSON::Field(key: "titleLimit")]
1287+ property title_limit : Float64?
1288+
1289+ # The padding, in pixels, between title and legend.
1290+ @[JSON::Field(key: "titlePadding")]
1291+ property title_padding : Float64?
1292+end
1293+
1294+class PaddingClass
1295+ include JSON::Serializable
1296+
1297+ property bottom : Float64?
1298+
1299+ property left : Float64?
1300+
1301+ property right : Float64?
1302+
1303+ property top : Float64?
1304+end
1305+
1306+# Projection configuration, which determines default properties for all
1307+# [projections](projection.html). For a full list of projection configuration options,
1308+# please see the [corresponding section of the projection
1309+# documentation](projection.html#config).
1310+#
1311+# Any property of Projection can be in config
1312+class ProjectionConfig
1313+ include JSON::Serializable
1314+
1315+ # Sets the projection’s center to the specified center, a two-element array of longitude
1316+ # and latitude in degrees.
1317+ #
1318+ # __Default value:__ `[0, 0]`
1319+ property center : Array(Float64)?
1320+
1321+ # Sets the projection’s clipping circle radius to the specified angle in degrees. If
1322+ # `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather
1323+ # than small-circle clipping.
1324+ @[JSON::Field(key: "clipAngle")]
1325+ property clip_angle : Float64?
1326+
1327+ # Sets the projection’s viewport clip extent to the specified bounds in pixels. The extent
1328+ # bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of
1329+ # the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no
1330+ # viewport clipping is performed.
1331+ @[JSON::Field(key: "clipExtent")]
1332+ property clip_extent : Array(Array(Float64))?
1333+
1334+ property coefficient : Float64?
1335+
1336+ property distance : Float64?
1337+
1338+ property fraction : Float64?
1339+
1340+ property lobes : Float64?
1341+
1342+ property parallel : Float64?
1343+
1344+ # Sets the threshold for the projection’s [adaptive
1345+ # resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This
1346+ # value corresponds to the [Douglas–Peucker
1347+ # distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm).
1348+ # If precision is not specified, returns the projection’s current resampling precision
1349+ # which defaults to `√0.5 ≅ 0.70710…`.
1350+ property precision : Hash(String, PrecisionValue)?
1351+
1352+ property radius : Float64?
1353+
1354+ property ratio : Float64?
1355+
1356+ # Sets the projection’s three-axis rotation to the specified angles, which must be a two-
1357+ # or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation
1358+ # angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)
1359+ #
1360+ # __Default value:__ `[0, 0, 0]`
1361+ property rotate : Array(Float64)?
1362+
1363+ property spacing : Float64?
1364+
1365+ property tilt : Float64?
1366+
1367+ # The cartographic projection to use. This value is case-insensitive, for example
1368+ # `"albers"` and `"Albers"` indicate the same projection type. You can find all valid
1369+ # projection types [in the
1370+ # documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).
1371+ #
1372+ # __Default value:__ `mercator`
1373+ @[JSON::Field(key: "type")]
1374+ property projection_config_type : String?
1375+end
1376+
1377+class VgScheme
1378+ include JSON::Serializable
1379+
1380+ property count : Float64?
1381+
1382+ property extent : Array(Float64)?
1383+
1384+ property scheme : String?
1385+
1386+ property step : Float64?
1387+end
1388+
1389+# Scale configuration determines default properties for all [scales](scale.html). For a
1390+# full list of scale configuration options, please see the [corresponding section of the
1391+# scale documentation](scale.html#config).
1392+class ScaleConfig
1393+ include JSON::Serializable
1394+
1395+ # Default inner padding for `x` and `y` band-ordinal scales.
1396+ #
1397+ # __Default value:__ `0.1`
1398+ @[JSON::Field(key: "bandPaddingInner")]
1399+ property band_padding_inner : Float64?
1400+
1401+ # Default outer padding for `x` and `y` band-ordinal scales.
1402+ # If not specified, by default, band scale's paddingOuter is paddingInner/2.
1403+ @[JSON::Field(key: "bandPaddingOuter")]
1404+ property band_padding_outer : Float64?
1405+
1406+ # If true, values that exceed the data domain are clamped to either the minimum or maximum
1407+ # range value
1408+ property clamp : Bool?
1409+
1410+ # Default padding for continuous scales.
1411+ #
1412+ # __Default:__ `5` for continuous x-scale of a vertical bar and continuous y-scale of a
1413+ # horizontal bar.; `0` otherwise.
1414+ @[JSON::Field(key: "continuousPadding")]
1415+ property continuous_padding : Float64?
1416+
1417+ # The default max value for mapping quantitative fields to bar's size/bandSize.
1418+ #
1419+ # If undefined (default), we will use the scale's `rangeStep` - 1.
1420+ @[JSON::Field(key: "maxBandSize")]
1421+ property max_band_size : Float64?
1422+
1423+ # The default max value for mapping quantitative fields to text's size/fontSize.
1424+ #
1425+ # __Default value:__ `40`
1426+ @[JSON::Field(key: "maxFontSize")]
1427+ property max_font_size : Float64?
1428+
1429+ # Default max opacity for mapping a field to opacity.
1430+ #
1431+ # __Default value:__ `0.8`
1432+ @[JSON::Field(key: "maxOpacity")]
1433+ property max_opacity : Float64?
1434+
1435+ # Default max value for point size scale.
1436+ @[JSON::Field(key: "maxSize")]
1437+ property max_size : Float64?
1438+
1439+ # Default max strokeWidth for strokeWidth (or rule/line's size) scale.
1440+ #
1441+ # __Default value:__ `4`
1442+ @[JSON::Field(key: "maxStrokeWidth")]
1443+ property max_stroke_width : Float64?
1444+
1445+ # The default min value for mapping quantitative fields to bar and tick's size/bandSize
1446+ # scale with zero=false.
1447+ #
1448+ # __Default value:__ `2`
1449+ @[JSON::Field(key: "minBandSize")]
1450+ property min_band_size : Float64?
1451+
1452+ # The default min value for mapping quantitative fields to tick's size/fontSize scale with
1453+ # zero=false
1454+ #
1455+ # __Default value:__ `8`
1456+ @[JSON::Field(key: "minFontSize")]
1457+ property min_font_size : Float64?
1458+
1459+ # Default minimum opacity for mapping a field to opacity.
1460+ #
1461+ # __Default value:__ `0.3`
1462+ @[JSON::Field(key: "minOpacity")]
1463+ property min_opacity : Float64?
1464+
1465+ # Default minimum value for point size scale with zero=false.
1466+ #
1467+ # __Default value:__ `9`
1468+ @[JSON::Field(key: "minSize")]
1469+ property min_size : Float64?
1470+
1471+ # Default minimum strokeWidth for strokeWidth (or rule/line's size) scale with zero=false.
1472+ #
1473+ # __Default value:__ `1`
1474+ @[JSON::Field(key: "minStrokeWidth")]
1475+ property min_stroke_width : Float64?
1476+
1477+ # Default outer padding for `x` and `y` point-ordinal scales.
1478+ #
1479+ # __Default value:__ `0.5`
1480+ @[JSON::Field(key: "pointPadding")]
1481+ property point_padding : Float64?
1482+
1483+ # Default range step for band and point scales of (1) the `y` channel
1484+ # and (2) the `x` channel when the mark is not `text`.
1485+ #
1486+ # __Default value:__ `21`
1487+ @[JSON::Field(key: "rangeStep")]
1488+ property range_step : Float64?
1489+
1490+ # If true, rounds numeric output values to integers.
1491+ # This can be helpful for snapping to the pixel grid.
1492+ # (Only available for `x`, `y`, and `size` scales.)
1493+ property round : Bool?
1494+
1495+ # Default range step for `x` band and point scales of text marks.
1496+ #
1497+ # __Default value:__ `90`
1498+ @[JSON::Field(key: "textXRangeStep")]
1499+ property text_x_range_step : Float64?
1500+
1501+ # Use the source data range before aggregation as scale domain instead of aggregated data
1502+ # for aggregate axis.
1503+ #
1504+ # This is equivalent to setting `domain` to `"unaggregate"` for aggregated _quantitative_
1505+ # fields by default.
1506+ #
1507+ # This property only works with aggregate functions that produce values within the raw data
1508+ # domain (`"mean"`, `"average"`, `"median"`, `"q1"`, `"q3"`, `"min"`, `"max"`). For other
1509+ # aggregations that produce values outside of the raw data domain (e.g. `"count"`,
1510+ # `"sum"`), this property is ignored.
1511+ #
1512+ # __Default value:__ `false`
1513+ @[JSON::Field(key: "useUnaggregatedDomain")]
1514+ property use_unaggregated_domain : Bool?
1515+end
1516+
1517+# An object hash for defining default properties for each type of selections.
1518+class SelectionConfig
1519+ include JSON::Serializable
1520+
1521+ # The default definition for an [`interval`](selection.html#type) selection. All properties
1522+ # and transformations
1523+ # for an interval selection definition (except `type`) may be specified here.
1524+ #
1525+ # For instance, setting `interval` to `{"translate": false}` disables the ability to move
1526+ # interval selections by default.
1527+ property interval : IntervalSelectionConfig?
1528+
1529+ # The default definition for a [`multi`](selection.html#type) selection. All properties and
1530+ # transformations
1531+ # for a multi selection definition (except `type`) may be specified here.
1532+ #
1533+ # For instance, setting `multi` to `{"toggle": "event.altKey"}` adds additional values to
1534+ # multi selections when clicking with the alt-key pressed by default.
1535+ property multi : MultiSelectionConfig?
1536+
1537+ # The default definition for a [`single`](selection.html#type) selection. All properties
1538+ # and transformations
1539+ # for a single selection definition (except `type`) may be specified here.
1540+ #
1541+ # For instance, setting `single` to `{"on": "dblclick"}` populates single selections on
1542+ # double-click by default.
1543+ property single : SingleSelectionConfig?
1544+end
1545+
1546+# The default definition for an [`interval`](selection.html#type) selection. All properties
1547+# and transformations
1548+# for an interval selection definition (except `type`) may be specified here.
1549+#
1550+# For instance, setting `interval` to `{"translate": false}` disables the ability to move
1551+# interval selections by default.
1552+class IntervalSelectionConfig
1553+ include JSON::Serializable
1554+
1555+ # Establishes a two-way binding between the interval selection and the scales
1556+ # used within the same view. This allows a user to interactively pan and
1557+ # zoom the view.
1558+ property bind : String?
1559+
1560+ # By default, all data values are considered to lie within an empty selection.
1561+ # When set to `none`, empty selections contain no data values.
1562+ property empty : String?
1563+
1564+ # An array of encoding channels. The corresponding data field values
1565+ # must match for a data tuple to fall within the selection.
1566+ property encodings : Array(String)?
1567+
1568+ # An array of field names whose values must match for a data tuple to
1569+ # fall within the selection.
1570+ property fields : Array(String)?
1571+
1572+ # An interval selection also adds a rectangle mark to depict the
1573+ # extents of the interval. The `mark` property can be used to customize the
1574+ # appearance of the mark.
1575+ property mark : BrushConfig?
1576+
1577+ # A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or
1578+ # selector) that triggers the selection.
1579+ # For interval selections, the event stream must specify a [start and
1580+ # end](https://vega.github.io/vega/docs/event-streams/#between-filters).
1581+ property on : JSON::Any?
1582+
1583+ # With layered and multi-view displays, a strategy that determines how
1584+ # selections' data queries are resolved when applied in a filter transform,
1585+ # conditional encoding rule, or scale domain.
1586+ property resolve : String?
1587+
1588+ # When truthy, allows a user to interactively move an interval selection
1589+ # back-and-forth. Can be `true`, `false` (to disable panning), or a
1590+ # [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/)
1591+ # which must include a start and end event to trigger continuous panning.
1592+ #
1593+ # __Default value:__ `true`, which corresponds to
1594+ # `[mousedown, window:mouseup] > window:mousemove!` which corresponds to
1595+ # clicks and dragging within an interval selection to reposition it.
1596+ property translate : Translate?
1597+
1598+ # When truthy, allows a user to interactively resize an interval selection.
1599+ # Can be `true`, `false` (to disable zooming), or a [Vega event stream
1600+ # definition](https://vega.github.io/vega/docs/event-streams/). Currently,
1601+ # only `wheel` events are supported.
1602+ #
1603+ #
1604+ # __Default value:__ `true`, which corresponds to `wheel!`.
1605+ property zoom : Translate?
1606+end
1607+
1608+# An interval selection also adds a rectangle mark to depict the
1609+# extents of the interval. The `mark` property can be used to customize the
1610+# appearance of the mark.
1611+class BrushConfig
1612+ include JSON::Serializable
1613+
1614+ # The fill color of the interval mark.
1615+ #
1616+ # __Default value:__ `#333333`
1617+ property fill : String?
1618+
1619+ # The fill opacity of the interval mark (a value between 0 and 1).
1620+ #
1621+ # __Default value:__ `0.125`
1622+ @[JSON::Field(key: "fillOpacity")]
1623+ property fill_opacity : Float64?
1624+
1625+ # The stroke color of the interval mark.
1626+ #
1627+ # __Default value:__ `#ffffff`
1628+ property stroke : String?
1629+
1630+ # An array of alternating stroke and space lengths,
1631+ # for creating dashed or dotted lines.
1632+ @[JSON::Field(key: "strokeDash")]
1633+ property stroke_dash : Array(Float64)?
1634+
1635+ # The offset (in pixels) with which to begin drawing the stroke dash array.
1636+ @[JSON::Field(key: "strokeDashOffset")]
1637+ property stroke_dash_offset : Float64?
1638+
1639+ # The stroke opacity of the interval mark (a value between 0 and 1).
1640+ @[JSON::Field(key: "strokeOpacity")]
1641+ property stroke_opacity : Float64?
1642+
1643+ # The stroke width of the interval mark.
1644+ @[JSON::Field(key: "strokeWidth")]
1645+ property stroke_width : Float64?
1646+end
1647+
1648+# The default definition for a [`multi`](selection.html#type) selection. All properties and
1649+# transformations
1650+# for a multi selection definition (except `type`) may be specified here.
1651+#
1652+# For instance, setting `multi` to `{"toggle": "event.altKey"}` adds additional values to
1653+# multi selections when clicking with the alt-key pressed by default.
1654+class MultiSelectionConfig
1655+ include JSON::Serializable
1656+
1657+ # By default, all data values are considered to lie within an empty selection.
1658+ # When set to `none`, empty selections contain no data values.
1659+ property empty : String?
1660+
1661+ # An array of encoding channels. The corresponding data field values
1662+ # must match for a data tuple to fall within the selection.
1663+ property encodings : Array(String)?
1664+
1665+ # An array of field names whose values must match for a data tuple to
1666+ # fall within the selection.
1667+ property fields : Array(String)?
1668+
1669+ # When true, an invisible voronoi diagram is computed to accelerate discrete
1670+ # selection. The data value _nearest_ the mouse cursor is added to the selection.
1671+ #
1672+ # See the [nearest transform](nearest.html) documentation for more information.
1673+ property nearest : Bool?
1674+
1675+ # A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or
1676+ # selector) that triggers the selection.
1677+ # For interval selections, the event stream must specify a [start and
1678+ # end](https://vega.github.io/vega/docs/event-streams/#between-filters).
1679+ property on : JSON::Any?
1680+
1681+ # With layered and multi-view displays, a strategy that determines how
1682+ # selections' data queries are resolved when applied in a filter transform,
1683+ # conditional encoding rule, or scale domain.
1684+ property resolve : String?
1685+
1686+ # Controls whether data values should be toggled or only ever inserted into
1687+ # multi selections. Can be `true`, `false` (for insertion only), or a
1688+ # [Vega expression](https://vega.github.io/vega/docs/expressions/).
1689+ #
1690+ # __Default value:__ `true`, which corresponds to `event.shiftKey` (i.e.,
1691+ # data values are toggled when a user interacts with the shift-key pressed).
1692+ #
1693+ # See the [toggle transform](toggle.html) documentation for more information.
1694+ property toggle : Translate?
1695+end
1696+
1697+# The default definition for a [`single`](selection.html#type) selection. All properties
1698+# and transformations
1699+# for a single selection definition (except `type`) may be specified here.
1700+#
1701+# For instance, setting `single` to `{"on": "dblclick"}` populates single selections on
1702+# double-click by default.
1703+class SingleSelectionConfig
1704+ include JSON::Serializable
1705+
1706+ # Establish a two-way binding between a single selection and input elements
1707+ # (also known as dynamic query widgets). A binding takes the form of
1708+ # Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)
1709+ # or can be a mapping between projected field/encodings and binding definitions.
1710+ #
1711+ # See the [bind transform](bind.html) documentation for more information.
1712+ property bind : Hash(String, VgBinding)?
1713+
1714+ # By default, all data values are considered to lie within an empty selection.
1715+ # When set to `none`, empty selections contain no data values.
1716+ property empty : String?
1717+
1718+ # An array of encoding channels. The corresponding data field values
1719+ # must match for a data tuple to fall within the selection.
1720+ property encodings : Array(String)?
1721+
1722+ # An array of field names whose values must match for a data tuple to
1723+ # fall within the selection.
1724+ property fields : Array(String)?
1725+
1726+ # When true, an invisible voronoi diagram is computed to accelerate discrete
1727+ # selection. The data value _nearest_ the mouse cursor is added to the selection.
1728+ #
1729+ # See the [nearest transform](nearest.html) documentation for more information.
1730+ property nearest : Bool?
1731+
1732+ # A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or
1733+ # selector) that triggers the selection.
1734+ # For interval selections, the event stream must specify a [start and
1735+ # end](https://vega.github.io/vega/docs/event-streams/#between-filters).
1736+ property on : JSON::Any?
1737+
1738+ # With layered and multi-view displays, a strategy that determines how
1739+ # selections' data queries are resolved when applied in a filter transform,
1740+ # conditional encoding rule, or scale domain.
1741+ property resolve : String?
1742+end
1743+
1744+class VgBinding
1745+ include JSON::Serializable
1746+
1747+ property element : String?
1748+
1749+ property input : String
1750+
1751+ property options : Array(String)?
1752+
1753+ property max : Float64?
1754+
1755+ property min : Float64?
1756+
1757+ property step : Float64?
1758+end
1759+
1760+class VgMarkConfig
1761+ include JSON::Serializable
1762+
1763+ # The horizontal alignment of the text. One of `"left"`, `"right"`, `"center"`.
1764+ property align : String?
1765+
1766+ # The rotation angle of the text, in degrees.
1767+ property angle : Float64?
1768+
1769+ # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
1770+ #
1771+ # __Default value:__ `"middle"`
1772+ property baseline : String?
1773+
1774+ # The mouse cursor used over the mark. Any valid [CSS cursor
1775+ # type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
1776+ property cursor : String?
1777+
1778+ # The horizontal offset, in pixels, between the text label and its anchor point. The offset
1779+ # is applied after rotation by the _angle_ property.
1780+ property dx : Float64?
1781+
1782+ # The vertical offset, in pixels, between the text label and its anchor point. The offset
1783+ # is applied after rotation by the _angle_ property.
1784+ property dy : Float64?
1785+
1786+ # Default Fill Color. This has higher precedence than config.color
1787+ #
1788+ # __Default value:__ (None)
1789+ property fill : String?
1790+
1791+ # The fill opacity (value between [0,1]).
1792+ #
1793+ # __Default value:__ `1`
1794+ @[JSON::Field(key: "fillOpacity")]
1795+ property fill_opacity : Float64?
1796+
1797+ # The typeface to set the text in (e.g., `"Helvetica Neue"`).
1798+ property font : String?
1799+
1800+ # The font size, in pixels.
1801+ @[JSON::Field(key: "fontSize")]
1802+ property font_size : Float64?
1803+
1804+ # The font style (e.g., `"italic"`).
1805+ @[JSON::Field(key: "fontStyle")]
1806+ property font_style : String?
1807+
1808+ # The font weight (e.g., `"bold"`).
1809+ @[JSON::Field(key: "fontWeight")]
1810+ property font_weight : FontWeightUnion?
1811+
1812+ # A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
1813+ property href : String?
1814+
1815+ # The line interpolation method to use for line and area marks. One of the following:
1816+ # - `"linear"`: piecewise linear segments, as in a polyline.
1817+ # - `"linear-closed"`: close the linear segments to form a polygon.
1818+ # - `"step"`: alternate between horizontal and vertical segments, as in a step function.
1819+ # - `"step-before"`: alternate between vertical and horizontal segments, as in a step
1820+ # function.
1821+ # - `"step-after"`: alternate between horizontal and vertical segments, as in a step
1822+ # function.
1823+ # - `"basis"`: a B-spline, with control point duplication on the ends.
1824+ # - `"basis-open"`: an open B-spline; may not intersect the start or end.
1825+ # - `"basis-closed"`: a closed B-spline, as in a loop.
1826+ # - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
1827+ # - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
1828+ # will intersect other control points.
1829+ # - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
1830+ # - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
1831+ # spline.
1832+ # - `"monotone"`: cubic interpolation that preserves monotonicity in y.
1833+ property interpolate : String?
1834+
1835+ # The maximum length of the text mark in pixels (default 0, indicating no limit). The text
1836+ # value will be automatically truncated if the rendered size exceeds the limit.
1837+ property limit : Float64?
1838+
1839+ # The overall opacity (value between [0,1]).
1840+ #
1841+ # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
1842+ # `square` marks or layered `bar` charts and `1` otherwise.
1843+ property opacity : Float64?
1844+
1845+ # The orientation of a non-stacked bar, tick, area, and line charts.
1846+ # The value is either horizontal (default) or vertical.
1847+ # - For bar, rule and tick, this determines whether the size of the bar and tick
1848+ # should be applied to x or y dimension.
1849+ # - For area, this property determines the orient property of the Vega output.
1850+ # - For line, this property determines the sort order of the points in the line
1851+ # if `config.sortLineBy` is not specified.
1852+ # For stacked charts, this is always determined by the orientation of the stack;
1853+ # therefore explicitly specified value will be ignored.
1854+ property orient : String?
1855+
1856+ # Polar coordinate radial offset, in pixels, of the text label from the origin determined
1857+ # by the `x` and `y` properties.
1858+ property radius : Float64?
1859+
1860+ # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
1861+ # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
1862+ #
1863+ # __Default value:__ `"circle"`
1864+ property shape : String?
1865+
1866+ # The pixel area each the point/circle/square.
1867+ # For example: in the case of circles, the radius is determined in part by the square root
1868+ # of the size value.
1869+ #
1870+ # __Default value:__ `30`
1871+ property size : Float64?
1872+
1873+ # Default Stroke Color. This has higher precedence than config.color
1874+ #
1875+ # __Default value:__ (None)
1876+ property stroke : String?
1877+
1878+ # An array of alternating stroke, space lengths for creating dashed or dotted lines.
1879+ @[JSON::Field(key: "strokeDash")]
1880+ property stroke_dash : Array(Float64)?
1881+
1882+ # The offset (in pixels) into which to begin drawing with the stroke dash array.
1883+ @[JSON::Field(key: "strokeDashOffset")]
1884+ property stroke_dash_offset : Float64?
1885+
1886+ # The stroke opacity (value between [0,1]).
1887+ #
1888+ # __Default value:__ `1`
1889+ @[JSON::Field(key: "strokeOpacity")]
1890+ property stroke_opacity : Float64?
1891+
1892+ # The stroke width, in pixels.
1893+ @[JSON::Field(key: "strokeWidth")]
1894+ property stroke_width : Float64?
1895+
1896+ # Depending on the interpolation type, sets the tension parameter (for line and area marks).
1897+ property tension : Float64?
1898+
1899+ # Placeholder text if the `text` channel is not specified
1900+ property text : String?
1901+
1902+ # Polar coordinate angle, in radians, of the text label from the origin determined by the
1903+ # `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark
1904+ # `startAngle` and `endAngle` properties: angles are measured in radians, with `0`
1905+ # indicating "north".
1906+ property theta : Float64?
1907+end
1908+
1909+# Text-Specific Config
1910+class TextConfig
1911+ include JSON::Serializable
1912+
1913+ # The horizontal alignment of the text. One of `"left"`, `"right"`, `"center"`.
1914+ property align : String?
1915+
1916+ # The rotation angle of the text, in degrees.
1917+ property angle : Float64?
1918+
1919+ # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
1920+ #
1921+ # __Default value:__ `"middle"`
1922+ property baseline : String?
1923+
1924+ # Default color. Note that `fill` and `stroke` have higher precedence than `color` and
1925+ # will override `color`.
1926+ #
1927+ # __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
1928+ #
1929+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
1930+ property color : String?
1931+
1932+ # The mouse cursor used over the mark. Any valid [CSS cursor
1933+ # type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
1934+ property cursor : String?
1935+
1936+ # The horizontal offset, in pixels, between the text label and its anchor point. The offset
1937+ # is applied after rotation by the _angle_ property.
1938+ property dx : Float64?
1939+
1940+ # The vertical offset, in pixels, between the text label and its anchor point. The offset
1941+ # is applied after rotation by the _angle_ property.
1942+ property dy : Float64?
1943+
1944+ # Default Fill Color. This has higher precedence than config.color
1945+ #
1946+ # __Default value:__ (None)
1947+ property fill : String?
1948+
1949+ # Whether the mark's color should be used as fill color instead of stroke color.
1950+ #
1951+ # __Default value:__ `true` for all marks except `point` and `false` for `point`.
1952+ #
1953+ # __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
1954+ #
1955+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
1956+ property filled : Bool?
1957+
1958+ # The fill opacity (value between [0,1]).
1959+ #
1960+ # __Default value:__ `1`
1961+ @[JSON::Field(key: "fillOpacity")]
1962+ property fill_opacity : Float64?
1963+
1964+ # The typeface to set the text in (e.g., `"Helvetica Neue"`).
1965+ property font : String?
1966+
1967+ # The font size, in pixels.
1968+ @[JSON::Field(key: "fontSize")]
1969+ property font_size : Float64?
1970+
1971+ # The font style (e.g., `"italic"`).
1972+ @[JSON::Field(key: "fontStyle")]
1973+ property font_style : String?
1974+
1975+ # The font weight (e.g., `"bold"`).
1976+ @[JSON::Field(key: "fontWeight")]
1977+ property font_weight : FontWeightUnion?
1978+
1979+ # A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
1980+ property href : String?
1981+
1982+ # The line interpolation method to use for line and area marks. One of the following:
1983+ # - `"linear"`: piecewise linear segments, as in a polyline.
1984+ # - `"linear-closed"`: close the linear segments to form a polygon.
1985+ # - `"step"`: alternate between horizontal and vertical segments, as in a step function.
1986+ # - `"step-before"`: alternate between vertical and horizontal segments, as in a step
1987+ # function.
1988+ # - `"step-after"`: alternate between horizontal and vertical segments, as in a step
1989+ # function.
1990+ # - `"basis"`: a B-spline, with control point duplication on the ends.
1991+ # - `"basis-open"`: an open B-spline; may not intersect the start or end.
1992+ # - `"basis-closed"`: a closed B-spline, as in a loop.
1993+ # - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
1994+ # - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
1995+ # will intersect other control points.
1996+ # - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
1997+ # - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
1998+ # spline.
1999+ # - `"monotone"`: cubic interpolation that preserves monotonicity in y.
2000+ property interpolate : String?
2001+
2002+ # The maximum length of the text mark in pixels (default 0, indicating no limit). The text
2003+ # value will be automatically truncated if the rendered size exceeds the limit.
2004+ property limit : Float64?
2005+
2006+ # The overall opacity (value between [0,1]).
2007+ #
2008+ # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
2009+ # `square` marks or layered `bar` charts and `1` otherwise.
2010+ property opacity : Float64?
2011+
2012+ # The orientation of a non-stacked bar, tick, area, and line charts.
2013+ # The value is either horizontal (default) or vertical.
2014+ # - For bar, rule and tick, this determines whether the size of the bar and tick
2015+ # should be applied to x or y dimension.
2016+ # - For area, this property determines the orient property of the Vega output.
2017+ # - For line, this property determines the sort order of the points in the line
2018+ # if `config.sortLineBy` is not specified.
2019+ # For stacked charts, this is always determined by the orientation of the stack;
2020+ # therefore explicitly specified value will be ignored.
2021+ property orient : String?
2022+
2023+ # Polar coordinate radial offset, in pixels, of the text label from the origin determined
2024+ # by the `x` and `y` properties.
2025+ property radius : Float64?
2026+
2027+ # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
2028+ # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
2029+ #
2030+ # __Default value:__ `"circle"`
2031+ property shape : String?
2032+
2033+ # Whether month names and weekday names should be abbreviated.
2034+ @[JSON::Field(key: "shortTimeLabels")]
2035+ property short_time_labels : Bool?
2036+
2037+ # The pixel area each the point/circle/square.
2038+ # For example: in the case of circles, the radius is determined in part by the square root
2039+ # of the size value.
2040+ #
2041+ # __Default value:__ `30`
2042+ property size : Float64?
2043+
2044+ # Default Stroke Color. This has higher precedence than config.color
2045+ #
2046+ # __Default value:__ (None)
2047+ property stroke : String?
2048+
2049+ # An array of alternating stroke, space lengths for creating dashed or dotted lines.
2050+ @[JSON::Field(key: "strokeDash")]
2051+ property stroke_dash : Array(Float64)?
2052+
2053+ # The offset (in pixels) into which to begin drawing with the stroke dash array.
2054+ @[JSON::Field(key: "strokeDashOffset")]
2055+ property stroke_dash_offset : Float64?
2056+
2057+ # The stroke opacity (value between [0,1]).
2058+ #
2059+ # __Default value:__ `1`
2060+ @[JSON::Field(key: "strokeOpacity")]
2061+ property stroke_opacity : Float64?
2062+
2063+ # The stroke width, in pixels.
2064+ @[JSON::Field(key: "strokeWidth")]
2065+ property stroke_width : Float64?
2066+
2067+ # Depending on the interpolation type, sets the tension parameter (for line and area marks).
2068+ property tension : Float64?
2069+
2070+ # Placeholder text if the `text` channel is not specified
2071+ property text : String?
2072+
2073+ # Polar coordinate angle, in radians, of the text label from the origin determined by the
2074+ # `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark
2075+ # `startAngle` and `endAngle` properties: angles are measured in radians, with `0`
2076+ # indicating "north".
2077+ property theta : Float64?
2078+end
2079+
2080+# Tick-Specific Config
2081+class TickConfig
2082+ include JSON::Serializable
2083+
2084+ # The horizontal alignment of the text. One of `"left"`, `"right"`, `"center"`.
2085+ property align : String?
2086+
2087+ # The rotation angle of the text, in degrees.
2088+ property angle : Float64?
2089+
2090+ # The width of the ticks.
2091+ #
2092+ # __Default value:__ 2/3 of rangeStep.
2093+ @[JSON::Field(key: "bandSize")]
2094+ property band_size : Float64?
2095+
2096+ # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
2097+ #
2098+ # __Default value:__ `"middle"`
2099+ property baseline : String?
2100+
2101+ # Default color. Note that `fill` and `stroke` have higher precedence than `color` and
2102+ # will override `color`.
2103+ #
2104+ # __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
2105+ #
2106+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
2107+ property color : String?
2108+
2109+ # The mouse cursor used over the mark. Any valid [CSS cursor
2110+ # type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
2111+ property cursor : String?
2112+
2113+ # The horizontal offset, in pixels, between the text label and its anchor point. The offset
2114+ # is applied after rotation by the _angle_ property.
2115+ property dx : Float64?
2116+
2117+ # The vertical offset, in pixels, between the text label and its anchor point. The offset
2118+ # is applied after rotation by the _angle_ property.
2119+ property dy : Float64?
2120+
2121+ # Default Fill Color. This has higher precedence than config.color
2122+ #
2123+ # __Default value:__ (None)
2124+ property fill : String?
2125+
2126+ # Whether the mark's color should be used as fill color instead of stroke color.
2127+ #
2128+ # __Default value:__ `true` for all marks except `point` and `false` for `point`.
2129+ #
2130+ # __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
2131+ #
2132+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
2133+ property filled : Bool?
2134+
2135+ # The fill opacity (value between [0,1]).
2136+ #
2137+ # __Default value:__ `1`
2138+ @[JSON::Field(key: "fillOpacity")]
2139+ property fill_opacity : Float64?
2140+
2141+ # The typeface to set the text in (e.g., `"Helvetica Neue"`).
2142+ property font : String?
2143+
2144+ # The font size, in pixels.
2145+ @[JSON::Field(key: "fontSize")]
2146+ property font_size : Float64?
2147+
2148+ # The font style (e.g., `"italic"`).
2149+ @[JSON::Field(key: "fontStyle")]
2150+ property font_style : String?
2151+
2152+ # The font weight (e.g., `"bold"`).
2153+ @[JSON::Field(key: "fontWeight")]
2154+ property font_weight : FontWeightUnion?
2155+
2156+ # A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
2157+ property href : String?
2158+
2159+ # The line interpolation method to use for line and area marks. One of the following:
2160+ # - `"linear"`: piecewise linear segments, as in a polyline.
2161+ # - `"linear-closed"`: close the linear segments to form a polygon.
2162+ # - `"step"`: alternate between horizontal and vertical segments, as in a step function.
2163+ # - `"step-before"`: alternate between vertical and horizontal segments, as in a step
2164+ # function.
2165+ # - `"step-after"`: alternate between horizontal and vertical segments, as in a step
2166+ # function.
2167+ # - `"basis"`: a B-spline, with control point duplication on the ends.
2168+ # - `"basis-open"`: an open B-spline; may not intersect the start or end.
2169+ # - `"basis-closed"`: a closed B-spline, as in a loop.
2170+ # - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
2171+ # - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
2172+ # will intersect other control points.
2173+ # - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
2174+ # - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
2175+ # spline.
2176+ # - `"monotone"`: cubic interpolation that preserves monotonicity in y.
2177+ property interpolate : String?
2178+
2179+ # The maximum length of the text mark in pixels (default 0, indicating no limit). The text
2180+ # value will be automatically truncated if the rendered size exceeds the limit.
2181+ property limit : Float64?
2182+
2183+ # The overall opacity (value between [0,1]).
2184+ #
2185+ # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
2186+ # `square` marks or layered `bar` charts and `1` otherwise.
2187+ property opacity : Float64?
2188+
2189+ # The orientation of a non-stacked bar, tick, area, and line charts.
2190+ # The value is either horizontal (default) or vertical.
2191+ # - For bar, rule and tick, this determines whether the size of the bar and tick
2192+ # should be applied to x or y dimension.
2193+ # - For area, this property determines the orient property of the Vega output.
2194+ # - For line, this property determines the sort order of the points in the line
2195+ # if `config.sortLineBy` is not specified.
2196+ # For stacked charts, this is always determined by the orientation of the stack;
2197+ # therefore explicitly specified value will be ignored.
2198+ property orient : String?
2199+
2200+ # Polar coordinate radial offset, in pixels, of the text label from the origin determined
2201+ # by the `x` and `y` properties.
2202+ property radius : Float64?
2203+
2204+ # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
2205+ # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
2206+ #
2207+ # __Default value:__ `"circle"`
2208+ property shape : String?
2209+
2210+ # The pixel area each the point/circle/square.
2211+ # For example: in the case of circles, the radius is determined in part by the square root
2212+ # of the size value.
2213+ #
2214+ # __Default value:__ `30`
2215+ property size : Float64?
2216+
2217+ # Default Stroke Color. This has higher precedence than config.color
2218+ #
2219+ # __Default value:__ (None)
2220+ property stroke : String?
2221+
2222+ # An array of alternating stroke, space lengths for creating dashed or dotted lines.
2223+ @[JSON::Field(key: "strokeDash")]
2224+ property stroke_dash : Array(Float64)?
2225+
2226+ # The offset (in pixels) into which to begin drawing with the stroke dash array.
2227+ @[JSON::Field(key: "strokeDashOffset")]
2228+ property stroke_dash_offset : Float64?
2229+
2230+ # The stroke opacity (value between [0,1]).
2231+ #
2232+ # __Default value:__ `1`
2233+ @[JSON::Field(key: "strokeOpacity")]
2234+ property stroke_opacity : Float64?
2235+
2236+ # The stroke width, in pixels.
2237+ @[JSON::Field(key: "strokeWidth")]
2238+ property stroke_width : Float64?
2239+
2240+ # Depending on the interpolation type, sets the tension parameter (for line and area marks).
2241+ property tension : Float64?
2242+
2243+ # Placeholder text if the `text` channel is not specified
2244+ property text : String?
2245+
2246+ # Polar coordinate angle, in radians, of the text label from the origin determined by the
2247+ # `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark
2248+ # `startAngle` and `endAngle` properties: angles are measured in radians, with `0`
2249+ # indicating "north".
2250+ property theta : Float64?
2251+
2252+ # Thickness of the tick mark.
2253+ #
2254+ # __Default value:__ `1`
2255+ property thickness : Float64?
2256+end
2257+
2258+# Title configuration, which determines default properties for all [titles](title.html).
2259+# For a full list of title configuration options, please see the [corresponding section of
2260+# the title documentation](title.html#config).
2261+class VgTitleConfig
2262+ include JSON::Serializable
2263+
2264+ # The anchor position for placing the title. One of `"start"`, `"middle"`, or `"end"`. For
2265+ # example, with an orientation of top these anchor positions map to a left-, center-, or
2266+ # right-aligned title.
2267+ #
2268+ # __Default value:__ `"middle"` for [single](spec.html) and [layered](layer.html) views.
2269+ # `"start"` for other composite views.
2270+ #
2271+ # __Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only
2272+ # customizable only for [single](spec.html) and [layered](layer.html) views. For other
2273+ # composite views, `anchor` is always `"start"`.
2274+ property anchor : String?
2275+
2276+ # Angle in degrees of title text.
2277+ property angle : Float64?
2278+
2279+ # Vertical text baseline for title text.
2280+ property baseline : String?
2281+
2282+ # Text color for title text.
2283+ property color : String?
2284+
2285+ # Font name for title text.
2286+ property font : String?
2287+
2288+ # Font size in pixels for title text.
2289+ #
2290+ # __Default value:__ `10`.
2291+ @[JSON::Field(key: "fontSize")]
2292+ property font_size : Float64?
2293+
2294+ # Font weight for title text.
2295+ @[JSON::Field(key: "fontWeight")]
2296+ property font_weight : FontWeightUnion?
2297+
2298+ # The maximum allowed length in pixels of legend labels.
2299+ property limit : Float64?
2300+
2301+ # Offset in pixels of the title from the chart body and axes.
2302+ property offset : Float64?
2303+
2304+ # Default title orientation ("top", "bottom", "left", or "right")
2305+ property orient : String?
2306+end
2307+
2308+# Default properties for [single view plots](spec.html#single).
2309+class ViewConfig
2310+ include JSON::Serializable
2311+
2312+ # Whether the view should be clipped.
2313+ property clip : Bool?
2314+
2315+ # The fill color.
2316+ #
2317+ # __Default value:__ (none)
2318+ property fill : String?
2319+
2320+ # The fill opacity (value between [0,1]).
2321+ #
2322+ # __Default value:__ (none)
2323+ @[JSON::Field(key: "fillOpacity")]
2324+ property fill_opacity : Float64?
2325+
2326+ # The default height of the single plot or each plot in a trellis plot when the
2327+ # visualization has a continuous (non-ordinal) y-scale with `rangeStep` = `null`.
2328+ #
2329+ # __Default value:__ `200`
2330+ property height : Float64?
2331+
2332+ # The stroke color.
2333+ #
2334+ # __Default value:__ (none)
2335+ property stroke : String?
2336+
2337+ # An array of alternating stroke, space lengths for creating dashed or dotted lines.
2338+ #
2339+ # __Default value:__ (none)
2340+ @[JSON::Field(key: "strokeDash")]
2341+ property stroke_dash : Array(Float64)?
2342+
2343+ # The offset (in pixels) into which to begin drawing with the stroke dash array.
2344+ #
2345+ # __Default value:__ (none)
2346+ @[JSON::Field(key: "strokeDashOffset")]
2347+ property stroke_dash_offset : Float64?
2348+
2349+ # The stroke opacity (value between [0,1]).
2350+ #
2351+ # __Default value:__ (none)
2352+ @[JSON::Field(key: "strokeOpacity")]
2353+ property stroke_opacity : Float64?
2354+
2355+ # The stroke width, in pixels.
2356+ #
2357+ # __Default value:__ (none)
2358+ @[JSON::Field(key: "strokeWidth")]
2359+ property stroke_width : Float64?
2360+
2361+ # The default width of the single plot or each plot in a trellis plot when the
2362+ # visualization has a continuous (non-ordinal) x-scale or ordinal x-scale with `rangeStep`
2363+ # = `null`.
2364+ #
2365+ # __Default value:__ `200`
2366+ property width : Float64?
2367+end
2368+
2369+# An object describing the data source
2370+#
2371+# Secondary data source to lookup in.
2372+class Data
2373+ include JSON::Serializable
2374+
2375+ # An object that specifies the format for parsing the data file.
2376+ #
2377+ # An object that specifies the format for parsing the data values.
2378+ #
2379+ # An object that specifies the format for parsing the data.
2380+ property format : DataFormat?
2381+
2382+ # An URL from which to load the data set. Use the `format.type` property
2383+ # to ensure the loaded data is correctly parsed.
2384+ property url : String?
2385+
2386+ # The full data set, included inline. This can be an array of objects or primitive values
2387+ # or a string.
2388+ # Arrays of primitive values are ingested as objects with a `data` property. Strings are
2389+ # parsed according to the specified format type.
2390+ property values : Values?
2391+
2392+ # Provide a placeholder name and bind data at runtime.
2393+ property name : String?
2394+end
2395+
2396+# An object that specifies the format for parsing the data file.
2397+#
2398+# An object that specifies the format for parsing the data values.
2399+#
2400+# An object that specifies the format for parsing the data.
2401+class DataFormat
2402+ include JSON::Serializable
2403+
2404+ # If set to auto (the default), perform automatic type inference to determine the desired
2405+ # data types.
2406+ # Alternatively, a parsing directive object can be provided for explicit data types. Each
2407+ # property of the object corresponds to a field name, and the value to the desired data
2408+ # type (one of `"number"`, `"boolean"` or `"date"`).
2409+ # For example, `"parse": {"modified_on": "date"}` parses the `modified_on` field in each
2410+ # input record a Date value.
2411+ #
2412+ # For `"date"`, we parse data based using Javascript's
2413+ # [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
2414+ # For Specific date formats can be provided (e.g., `{foo: 'date:"%m%d%Y"'}`), using the
2415+ # [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date
2416+ # format parsing is supported similarly (e.g., `{foo: 'utc:"%m%d%Y"'}`). See more about
2417+ # [UTC time](timeunit.html#utc)
2418+ property parse : ParseUnion?
2419+
2420+ # Type of input data: `"json"`, `"csv"`, `"tsv"`.
2421+ # The default format type is determined by the extension of the file URL.
2422+ # If no extension is detected, `"json"` will be used by default.
2423+ @[JSON::Field(key: "type")]
2424+ property data_format_type : String?
2425+
2426+ # The JSON property containing the desired data.
2427+ # This parameter can be used when the loaded JSON file may have surrounding structure or
2428+ # meta-data.
2429+ # For example `"property": "values.features"` is equivalent to retrieving
2430+ # `json.values.features`
2431+ # from the loaded JSON object.
2432+ property property : String?
2433+
2434+ # The name of the TopoJSON object set to convert to a GeoJSON feature collection.
2435+ # For example, in a map of the world, there may be an object set named `"countries"`.
2436+ # Using the feature property, we can extract this set and generate a GeoJSON feature object
2437+ # for each country.
2438+ property feature : String?
2439+
2440+ # The name of the TopoJSON object set to convert to mesh.
2441+ # Similar to the `feature` option, `mesh` extracts a named TopoJSON object set.
2442+ # Unlike the `feature` option, the corresponding geo data is returned as a single, unified
2443+ # mesh instance, not as individual GeoJSON features.
2444+ # Extracting a mesh is useful for more efficiently drawing borders or other geographic
2445+ # elements that you do not need to associate with specific regions such as individual
2446+ # countries, states or counties.
2447+ property mesh : String?
2448+end
2449+
2450+# A key-value mapping between encoding channels and definition of fields.
2451+class EncodingWithFacet
2452+ include JSON::Serializable
2453+
2454+ # Color of the marks – either fill or stroke color based on mark type.
2455+ # By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`,
2456+ # `"text"`, `"circle"`, and `"square"` / stroke color for `"line"` and `"point"`.
2457+ #
2458+ # __Default value:__ If undefined, the default color depends on [mark
2459+ # config](config.html#mark)'s `color` property.
2460+ #
2461+ # _Note:_ See the scale documentation for more information about customizing [color
2462+ # scheme](scale.html#scheme).
2463+ property color : MarkPropDefWithCondition?
2464+
2465+ # Horizontal facets for trellis plots.
2466+ property column : FacetFieldDef?
2467+
2468+ # Additional levels of detail for grouping data in aggregate views and
2469+ # in line and area marks without mapping data to a specific visual channel.
2470+ property detail : Detail?
2471+
2472+ # A URL to load upon mouse click.
2473+ property href : DefWithCondition?
2474+
2475+ # Opacity of the marks – either can be a value or a range.
2476+ #
2477+ # __Default value:__ If undefined, the default opacity depends on [mark
2478+ # config](config.html#mark)'s `opacity` property.
2479+ property opacity : MarkPropDefWithCondition?
2480+
2481+ # Stack order for stacked marks or order of data points in line marks for connected scatter
2482+ # plots.
2483+ #
2484+ # __Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating
2485+ # additional aggregation grouping.
2486+ property order : Order?
2487+
2488+ # Vertical facets for trellis plots.
2489+ property row : FacetFieldDef?
2490+
2491+ # For `point` marks the supported values are
2492+ # `"circle"` (default), `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`,
2493+ # or `"triangle-down"`, or else a custom SVG path string.
2494+ # For `geoshape` marks it should be a field definition of the geojson data
2495+ #
2496+ # __Default value:__ If undefined, the default shape depends on [mark
2497+ # config](config.html#point-config)'s `shape` property.
2498+ property shape : MarkPropDefWithCondition?
2499+
2500+ # Size of the mark.
2501+ # - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
2502+ # - For `"bar"` and `"tick"` – the bar and tick's size.
2503+ # - For `"text"` – the text's font size.
2504+ # - Size is currently unsupported for `"line"`, `"area"`, and `"rect"`.
2505+ property size : MarkPropDefWithCondition?
2506+
2507+ # Text of the `text` mark.
2508+ property text : TextDefWithCondition?
2509+
2510+ # The tooltip text to show upon mouse hover.
2511+ property tooltip : TextDefWithCondition?
2512+
2513+ # X coordinates of the marks, or width of horizontal `"bar"` and `"area"`.
2514+ property x : XClass?
2515+
2516+ # X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and `"rule"`.
2517+ property x2 : X2Class?
2518+
2519+ # Y coordinates of the marks, or height of vertical `"bar"` and `"area"`.
2520+ property y : XClass?
2521+
2522+ # Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and `"rule"`.
2523+ property y2 : X2Class?
2524+end
2525+
2526+# Color of the marks – either fill or stroke color based on mark type.
2527+# By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`,
2528+# `"text"`, `"circle"`, and `"square"` / stroke color for `"line"` and `"point"`.
2529+#
2530+# __Default value:__ If undefined, the default color depends on [mark
2531+# config](config.html#mark)'s `color` property.
2532+#
2533+# _Note:_ See the scale documentation for more information about customizing [color
2534+# scheme](scale.html#scheme).
2535+#
2536+# Opacity of the marks – either can be a value or a range.
2537+#
2538+# __Default value:__ If undefined, the default opacity depends on [mark
2539+# config](config.html#mark)'s `opacity` property.
2540+#
2541+# For `point` marks the supported values are
2542+# `"circle"` (default), `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`,
2543+# or `"triangle-down"`, or else a custom SVG path string.
2544+# For `geoshape` marks it should be a field definition of the geojson data
2545+#
2546+# __Default value:__ If undefined, the default shape depends on [mark
2547+# config](config.html#point-config)'s `shape` property.
2548+#
2549+# Size of the mark.
2550+# - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
2551+# - For `"bar"` and `"tick"` – the bar and tick's size.
2552+# - For `"text"` – the text's font size.
2553+# - Size is currently unsupported for `"line"`, `"area"`, and `"rect"`.
2554+#
2555+# A FieldDef with Condition<ValueDef>
2556+# {
2557+# condition: {value: ...},
2558+# field: ...,
2559+# ...
2560+# }
2561+#
2562+# A ValueDef with Condition<ValueDef | FieldDef>
2563+# {
2564+# condition: {field: ...} | {value: ...},
2565+# value: ...,
2566+# }
2567+class MarkPropDefWithCondition
2568+ include JSON::Serializable
2569+
2570+ # Aggregation function for the field
2571+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
2572+ #
2573+ # __Default value:__ `undefined` (None)
2574+ property aggregate : String?
2575+
2576+ # A flag for binning a `quantitative` field, or [an object defining binning
2577+ # parameters](bin.html#params).
2578+ # If `true`, default [binning parameters](bin.html) will be applied.
2579+ #
2580+ # __Default value:__ `false`
2581+ property bin : Bin?
2582+
2583+ # One or more value definition(s) with a selection predicate.
2584+ #
2585+ # __Note:__ A field definition's `condition` property can only contain [value
2586+ # definitions](encoding.html#value-def)
2587+ # since Vega-Lite only allows at most one encoded field per encoding channel.
2588+ #
2589+ # A field definition or one or more value definition(s) with a selection predicate.
2590+ property condition : ColorCondition?
2591+
2592+ # __Required.__ A string defining the name of the field from which to pull a data value
2593+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
2594+ #
2595+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
2596+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
2597+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
2598+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
2599+ # See more details about escaping in the [field documentation](field.html).
2600+ #
2601+ # __Note:__ `field` is not required if `aggregate` is `count`.
2602+ property field : Field?
2603+
2604+ # An object defining properties of the legend.
2605+ # If `null`, the legend for the encoding channel will be removed.
2606+ #
2607+ # __Default value:__ If undefined, default [legend properties](legend.html) are applied.
2608+ property legend : Legend?
2609+
2610+ # An object defining properties of the channel's scale, which is the function that
2611+ # transforms values in the data domain (numbers, dates, strings, etc) to visual values
2612+ # (pixels, colors, sizes) of the encoding channels.
2613+ #
2614+ # __Default value:__ If undefined, default [scale properties](scale.html) are applied.
2615+ property scale : Scale?
2616+
2617+ # Sort order for the encoded field.
2618+ # Supported `sort` values include `"ascending"`, `"descending"` and `null` (no sorting).
2619+ # For fields with discrete domains, `sort` can also be a [sort field definition
2620+ # object](sort.html#sort-field).
2621+ #
2622+ # __Default value:__ `"ascending"`
2623+ property sort : SortUnion?
2624+
2625+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
2626+ # or [a temporal field that gets casted as ordinal](type.html#cast).
2627+ #
2628+ # __Default value:__ `undefined` (None)
2629+ @[JSON::Field(key: "timeUnit")]
2630+ property time_unit : String?
2631+
2632+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
2633+ # `"nominal"`).
2634+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
2635+ # [geographic projection](projection.html) is applied.
2636+ @[JSON::Field(key: "type")]
2637+ property mark_prop_def_with_condition_type : String?
2638+
2639+ # A constant value in visual domain.
2640+ property value : ConditionalPredicateValueDefValue?
2641+end
2642+
2643+# Binning properties or boolean flag for determining whether to bin data or not.
2644+class BinParams
2645+ include JSON::Serializable
2646+
2647+ # The number base to use for automatic bin determination (default is base 10).
2648+ #
2649+ # __Default value:__ `10`
2650+ property base : Float64?
2651+
2652+ # Scale factors indicating allowable subdivisions. The default value is [5, 2], which
2653+ # indicates that for base 10 numbers (the default base), the method may consider dividing
2654+ # bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can
2655+ # check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the
2656+ # given constraints.
2657+ #
2658+ # __Default value:__ `[5, 2]`
2659+ property divide : Array(Float64)?
2660+
2661+ # A two-element (`[min, max]`) array indicating the range of desired bin values.
2662+ property extent : Array(Float64)?
2663+
2664+ # Maximum number of bins.
2665+ #
2666+ # __Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels
2667+ property maxbins : Float64?
2668+
2669+ # A minimum allowable step size (particularly useful for integer values).
2670+ property minstep : Float64?
2671+
2672+ # If true (the default), attempts to make the bin boundaries use human-friendly boundaries,
2673+ # such as multiples of ten.
2674+ property nice : Bool?
2675+
2676+ # An exact step size to use between bins.
2677+ #
2678+ # __Note:__ If provided, options such as maxbins will be ignored.
2679+ property step : Float64?
2680+
2681+ # An array of allowable step sizes to choose from.
2682+ property steps : Array(Float64)?
2683+end
2684+
2685+class ConditionalValueDef
2686+ include JSON::Serializable
2687+
2688+ property test : ConditionalValueDefLogicalOperandPredicate?
2689+
2690+ # A constant value in visual domain (e.g., `"red"` / "#0099ff" for color, values between
2691+ # `0` to `1` for opacity).
2692+ property value : ConditionalValueDefValue
2693+
2694+ # A [selection name](selection.html), or a series of [composed
2695+ # selections](selection.html#compose).
2696+ property selection : ConditionalValueDefSelectionOperand?
2697+end
2698+
2699+class Selection
2700+ include JSON::Serializable
2701+
2702+ property not : ConditionalValueDefSelectionOperand?
2703+
2704+ property and : Array(SelectionOperandElement)?
2705+
2706+ property or : Array(SelectionOperandElement)?
2707+end
2708+
2709+class Predicate
2710+ include JSON::Serializable
2711+
2712+ property not : ConditionalValueDefLogicalOperandPredicate?
2713+
2714+ property and : Array(LogicalOperandPredicateElement)?
2715+
2716+ property or : Array(LogicalOperandPredicateElement)?
2717+
2718+ # The value that the field should be equal to.
2719+ property equal : EqualUnion?
2720+
2721+ # Field to be filtered.
2722+ #
2723+ # Field to be filtered
2724+ property field : String?
2725+
2726+ # Time unit for the field to be filtered.
2727+ #
2728+ # time unit for the field to be filtered.
2729+ @[JSON::Field(key: "timeUnit")]
2730+ property time_unit : String?
2731+
2732+ # An array of inclusive minimum and maximum values
2733+ # for a field value of a data item to be included in the filtered data.
2734+ property range : Array(RangeElement?)?
2735+
2736+ # A set of values that the `field`'s value should be a member of,
2737+ # for a data item included in the filtered data.
2738+ @[JSON::Field(key: "oneOf")]
2739+ property one_of : Array(OneOfElement)?
2740+
2741+ # Filter using a selection name.
2742+ property selection : ConditionalValueDefSelectionOperand?
2743+end
2744+
2745+# Object for defining datetime in Vega-Lite Filter.
2746+# If both month and quarter are provided, month has higher precedence.
2747+# `day` cannot be combined with other date.
2748+# We accept string for month and day names.
2749+class DateTime
2750+ include JSON::Serializable
2751+
2752+ # Integer value representing the date from 1-31.
2753+ property date : Float64?
2754+
2755+ # Value representing the day of a week. This can be one of: (1) integer value -- `1`
2756+ # represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
2757+ # case-insensitive, 3-character short day name (e.g., `"Mon"`). <br/> **Warning:** A
2758+ # DateTime definition object with `day`** should not be combined with `year`, `quarter`,
2759+ # `month`, or `date`.
2760+ property day : Day?
2761+
2762+ # Integer value representing the hour of a day from 0-23.
2763+ property hours : Float64?
2764+
2765+ # Integer value representing the millisecond segment of time.
2766+ property milliseconds : Float64?
2767+
2768+ # Integer value representing the minute segment of time from 0-59.
2769+ property minutes : Float64?
2770+
2771+ # One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
2772+ # (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
2773+ # short month name (e.g., `"Jan"`).
2774+ property month : Month?
2775+
2776+ # Integer value representing the quarter of the year (from 1-4).
2777+ property quarter : Float64?
2778+
2779+ # Integer value representing the second segment (0-59) of a time value
2780+ property seconds : Float64?
2781+
2782+ # A boolean flag indicating if date time is in utc time. If false, the date time is in
2783+ # local time
2784+ property utc : Bool?
2785+
2786+ # Integer value representing the year.
2787+ property year : Float64?
2788+end
2789+
2790+class ConditionalPredicateMarkPropFieldDefClass
2791+ include JSON::Serializable
2792+
2793+ property test : ConditionalValueDefLogicalOperandPredicate?
2794+
2795+ # A constant value in visual domain (e.g., `"red"` / "#0099ff" for color, values between
2796+ # `0` to `1` for opacity).
2797+ property value : ConditionalPredicateValueDefValue?
2798+
2799+ # A [selection name](selection.html), or a series of [composed
2800+ # selections](selection.html#compose).
2801+ property selection : ConditionalValueDefSelectionOperand?
2802+
2803+ # Aggregation function for the field
2804+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
2805+ #
2806+ # __Default value:__ `undefined` (None)
2807+ property aggregate : String?
2808+
2809+ # A flag for binning a `quantitative` field, or [an object defining binning
2810+ # parameters](bin.html#params).
2811+ # If `true`, default [binning parameters](bin.html) will be applied.
2812+ #
2813+ # __Default value:__ `false`
2814+ property bin : Bin?
2815+
2816+ # __Required.__ A string defining the name of the field from which to pull a data value
2817+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
2818+ #
2819+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
2820+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
2821+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
2822+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
2823+ # See more details about escaping in the [field documentation](field.html).
2824+ #
2825+ # __Note:__ `field` is not required if `aggregate` is `count`.
2826+ property field : Field?
2827+
2828+ # An object defining properties of the legend.
2829+ # If `null`, the legend for the encoding channel will be removed.
2830+ #
2831+ # __Default value:__ If undefined, default [legend properties](legend.html) are applied.
2832+ property legend : Legend?
2833+
2834+ # An object defining properties of the channel's scale, which is the function that
2835+ # transforms values in the data domain (numbers, dates, strings, etc) to visual values
2836+ # (pixels, colors, sizes) of the encoding channels.
2837+ #
2838+ # __Default value:__ If undefined, default [scale properties](scale.html) are applied.
2839+ property scale : Scale?
2840+
2841+ # Sort order for the encoded field.
2842+ # Supported `sort` values include `"ascending"`, `"descending"` and `null` (no sorting).
2843+ # For fields with discrete domains, `sort` can also be a [sort field definition
2844+ # object](sort.html#sort-field).
2845+ #
2846+ # __Default value:__ `"ascending"`
2847+ property sort : SortUnion?
2848+
2849+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
2850+ # or [a temporal field that gets casted as ordinal](type.html#cast).
2851+ #
2852+ # __Default value:__ `undefined` (None)
2853+ @[JSON::Field(key: "timeUnit")]
2854+ property time_unit : String?
2855+
2856+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
2857+ # `"nominal"`).
2858+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
2859+ # [geographic projection](projection.html) is applied.
2860+ @[JSON::Field(key: "type")]
2861+ property conditional_def_type : String?
2862+end
2863+
2864+# Reference to a repeated value.
2865+class RepeatRef
2866+ include JSON::Serializable
2867+
2868+ property repeat : String
2869+end
2870+
2871+# Properties of a legend or boolean flag for determining whether to show it.
2872+class Legend
2873+ include JSON::Serializable
2874+
2875+ # Padding (in pixels) between legend entries in a symbol legend.
2876+ @[JSON::Field(key: "entryPadding")]
2877+ property entry_padding : Float64?
2878+
2879+ # The formatting pattern for labels. This is D3's [number format
2880+ # pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's
2881+ # [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time
2882+ # field.
2883+ #
2884+ # See the [format documentation](format.html) for more information.
2885+ #
2886+ # __Default value:__ derived from [numberFormat](config.html#format) config for
2887+ # quantitative fields and from [timeFormat](config.html#format) config for temporal fields.
2888+ property format : String?
2889+
2890+ # The offset, in pixels, by which to displace the legend from the edge of the enclosing
2891+ # group or data rectangle.
2892+ #
2893+ # __Default value:__ `0`
2894+ property offset : Float64?
2895+
2896+ # The orientation of the legend, which determines how the legend is positioned within the
2897+ # scene. One of "left", "right", "top-left", "top-right", "bottom-left", "bottom-right",
2898+ # "none".
2899+ #
2900+ # __Default value:__ `"right"`
2901+ property orient : String?
2902+
2903+ # The padding, in pixels, between the legend and axis.
2904+ property padding : Float64?
2905+
2906+ # The desired number of tick values for quantitative legends.
2907+ @[JSON::Field(key: "tickCount")]
2908+ property tick_count : Float64?
2909+
2910+ # A title for the field. If `null`, the title will be removed.
2911+ #
2912+ # __Default value:__ derived from the field's name and transformation function
2913+ # (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the
2914+ # function is displayed as a part of the title (e.g., `"Sum of Profit"`). If the field is
2915+ # binned or has a time unit applied, the applied function will be denoted in parentheses
2916+ # (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is
2917+ # simply the field name.
2918+ #
2919+ # __Note__: You can customize the default field title format by providing the [`fieldTitle`
2920+ # property in the [config](config.html) or [`fieldTitle` function via the `compile`
2921+ # function's options](compile.html#field-title).
2922+ property title : String?
2923+
2924+ # The type of the legend. Use `"symbol"` to create a discrete legend and `"gradient"` for a
2925+ # continuous color gradient.
2926+ #
2927+ # __Default value:__ `"gradient"` for non-binned quantitative fields and temporal fields;
2928+ # `"symbol"` otherwise.
2929+ @[JSON::Field(key: "type")]
2930+ property legend_type : String?
2931+
2932+ # Explicitly set the visible legend values.
2933+ property values : Array(LegendValue)?
2934+
2935+ # A non-positive integer indicating z-index of the legend.
2936+ # If zindex is 0, legend should be drawn behind all chart elements.
2937+ # To put them in front, use zindex = 1.
2938+ property zindex : Float64?
2939+end
2940+
2941+# An object defining properties of the channel's scale, which is the function that
2942+# transforms values in the data domain (numbers, dates, strings, etc) to visual values
2943+# (pixels, colors, sizes) of the encoding channels.
2944+#
2945+# __Default value:__ If undefined, default [scale properties](scale.html) are applied.
2946+class Scale
2947+ include JSON::Serializable
2948+
2949+ # The logarithm base of the `log` scale (default `10`).
2950+ property base : Float64?
2951+
2952+ # If `true`, values that exceed the data domain are clamped to either the minimum or
2953+ # maximum range value
2954+ #
2955+ # __Default value:__ derived from the [scale config](config.html#scale-config)'s `clamp`
2956+ # (`true` by default).
2957+ property clamp : Bool?
2958+
2959+ # Customized domain values.
2960+ #
2961+ # For _quantitative_ fields, `domain` can take the form of a two-element array with minimum
2962+ # and maximum values. [Piecewise scales](scale.html#piecewise) can be created by providing
2963+ # a `domain` with more than two entries.
2964+ # If the input field is aggregated, `domain` can also be a string value `"unaggregated"`,
2965+ # indicating that the domain should include the raw data values prior to the aggregation.
2966+ #
2967+ # For _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in
2968+ # the form of either timestamps or the [DateTime definition objects](types.html#datetime).
2969+ #
2970+ # For _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input
2971+ # values.
2972+ #
2973+ # The `selection` property can be used to [interactively
2974+ # determine](selection.html#scale-domains) the scale domain.
2975+ property domain : DomainUnion?
2976+
2977+ # The exponent of the `pow` scale.
2978+ property exponent : Float64?
2979+
2980+ # The interpolation method for range values. By default, a general interpolator for
2981+ # numbers, dates, strings and colors (in RGB space) is used. For color ranges, this
2982+ # property allows interpolation in alternative color spaces. Legal values include `rgb`,
2983+ # `hsl`, `hsl-long`, `lab`, `hcl`, `hcl-long`, `cubehelix` and `cubehelix-long` ('-long'
2984+ # variants use longer paths in polar coordinate spaces). If object-valued, this property
2985+ # accepts an object with a string-valued _type_ property and an optional numeric _gamma_
2986+ # property applicable to rgb and cubehelix interpolators. For more, see the [d3-interpolate
2987+ # documentation](https://github.com/d3/d3-interpolate).
2988+ #
2989+ # __Note:__ Sequential scales do not support `interpolate` as they have a fixed
2990+ # interpolator. Since Vega-Lite uses sequential scales for quantitative fields by default,
2991+ # you have to set the scale `type` to other quantitative scale type such as `"linear"` to
2992+ # customize `interpolate`.
2993+ property interpolate : InterpolateUnion?
2994+
2995+ # Extending the domain so that it starts and ends on nice round values. This method
2996+ # typically modifies the scale’s domain, and may only extend the bounds to the nearest
2997+ # round value. Nicing is useful if the domain is computed from data and may be irregular.
2998+ # For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2,
2999+ # 1.0]_.
3000+ #
3001+ # For quantitative scales such as linear, `nice` can be either a boolean flag or a number.
3002+ # If `nice` is a number, it will represent a desired tick count. This allows greater
3003+ # control over the step size used to extend the bounds, guaranteeing that the returned
3004+ # ticks will exactly cover the domain.
3005+ #
3006+ # For temporal fields with time and utc scales, the `nice` value can be a string indicating
3007+ # the desired time interval. Legal values are `"millisecond"`, `"second"`, `"minute"`,
3008+ # `"hour"`, `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, `time` and `utc`
3009+ # scales can accept an object-valued interval specifier of the form `{"interval": "month",
3010+ # "step": 3}`, which includes a desired number of interval steps. Here, the domain would
3011+ # snap to quarter (Jan, Apr, Jul, Oct) boundaries.
3012+ #
3013+ # __Default value:__ `true` for unbinned _quantitative_ fields; `false` otherwise.
3014+ property nice : NiceUnion?
3015+
3016+ # For _[continuous](scale.html#continuous)_ scales, expands the scale domain to accommodate
3017+ # the specified number of pixels on each of the scale range. The scale range must represent
3018+ # pixels for this parameter to function as intended. Padding adjustment is performed prior
3019+ # to all other adjustments, including the effects of the zero, nice, domainMin, and
3020+ # domainMax properties.
3021+ #
3022+ # For _[band](scale.html#band)_ scales, shortcut for setting `paddingInner` and
3023+ # `paddingOuter` to the same value.
3024+ #
3025+ # For _[point](scale.html#point)_ scales, alias for `paddingOuter`.
3026+ #
3027+ # __Default value:__ For _continuous_ scales, derived from the [scale
3028+ # config](scale.html#config)'s `continuousPadding`.
3029+ # For _band and point_ scales, see `paddingInner` and `paddingOuter`.
3030+ property padding : Float64?
3031+
3032+ # The inner padding (spacing) within each band step of band scales, as a fraction of the
3033+ # step size. This value must lie in the range [0,1].
3034+ #
3035+ # For point scale, this property is invalid as point scales do not have internal band
3036+ # widths (only step sizes between bands).
3037+ #
3038+ # __Default value:__ derived from the [scale config](scale.html#config)'s
3039+ # `bandPaddingInner`.
3040+ @[JSON::Field(key: "paddingInner")]
3041+ property padding_inner : Float64?
3042+
3043+ # The outer padding (spacing) at the ends of the range of band and point scales,
3044+ # as a fraction of the step size. This value must lie in the range [0,1].
3045+ #
3046+ # __Default value:__ derived from the [scale config](scale.html#config)'s
3047+ # `bandPaddingOuter` for band scales and `pointPadding` for point scales.
3048+ @[JSON::Field(key: "paddingOuter")]
3049+ property padding_outer : Float64?
3050+
3051+ # The range of the scale. One of:
3052+ #
3053+ # - A string indicating a [pre-defined named scale range](scale.html#range-config) (e.g.,
3054+ # example, `"symbol"`, or `"diverging"`).
3055+ #
3056+ # - For [continuous scales](scale.html#continuous), two-element array indicating minimum
3057+ # and maximum values, or an array with more than two entries for specifying a [piecewise
3058+ # scale](scale.html#piecewise).
3059+ #
3060+ # - For [discrete](scale.html#discrete) and [discretizing](scale.html#discretizing) scales,
3061+ # an array of desired output values.
3062+ #
3063+ # __Notes:__
3064+ #
3065+ # 1) For [sequential](scale.html#sequential), [ordinal](scale.html#ordinal), and
3066+ # discretizing color scales, you can also specify a color [`scheme`](scale.html#scheme)
3067+ # instead of `range`.
3068+ #
3069+ # 2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be
3070+ # customized via the view's corresponding [size](size.html) (`width` and `height`) or via
3071+ # [range steps and paddings properties](#range-step) for [band](#band) and [point](#point)
3072+ # scales.
3073+ property range : ScaleRange?
3074+
3075+ # The distance between the starts of adjacent bands or points in [band](scale.html#band)
3076+ # and [point](scale.html#point) scales.
3077+ #
3078+ # If `rangeStep` is `null` or if the view contains the scale's corresponding
3079+ # [size](size.html) (`width` for `x` scales and `height` for `y` scales), `rangeStep` will
3080+ # be automatically determined to fit the size of the view.
3081+ #
3082+ # __Default value:__ derived the [scale config](config.html#scale-config)'s
3083+ # `textXRangeStep` (`90` by default) for x-scales of `text` marks and `rangeStep` (`21` by
3084+ # default) for x-scales of other marks and y-scales.
3085+ #
3086+ # __Warning__: If `rangeStep` is `null` and the cardinality of the scale's domain is higher
3087+ # than `width` or `height`, the rangeStep might become less than one pixel and the mark
3088+ # might not appear correctly.
3089+ @[JSON::Field(key: "rangeStep")]
3090+ property range_step : Float64?
3091+
3092+ # If `true`, rounds numeric output values to integers. This can be helpful for snapping to
3093+ # the pixel grid.
3094+ #
3095+ # __Default value:__ `false`.
3096+ property round : Bool?
3097+
3098+ # A string indicating a color [scheme](scale.html#scheme) name (e.g., `"category10"` or
3099+ # `"viridis"`) or a [scheme parameter object](scale.html#scheme-params).
3100+ #
3101+ # Discrete color schemes may be used with [discrete](scale.html#discrete) or
3102+ # [discretizing](scale.html#discretizing) scales. Continuous color schemes are intended for
3103+ # use with [sequential](scales.html#sequential) scales.
3104+ #
3105+ # For the full list of supported scheme, please refer to the [Vega
3106+ # Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.
3107+ property scheme : Scheme?
3108+
3109+ # The type of scale. Vega-Lite supports the following categories of scale types:
3110+ #
3111+ # 1) [**Continuous Scales**](scale.html#continuous) -- mapping continuous domains to
3112+ # continuous output ranges ([`"linear"`](scale.html#linear), [`"pow"`](scale.html#pow),
3113+ # [`"sqrt"`](scale.html#sqrt), [`"log"`](scale.html#log), [`"time"`](scale.html#time),
3114+ # [`"utc"`](scale.html#utc), [`"sequential"`](scale.html#sequential)).
3115+ #
3116+ # 2) [**Discrete Scales**](scale.html#discrete) -- mapping discrete domains to discrete
3117+ # ([`"ordinal"`](scale.html#ordinal)) or continuous ([`"band"`](scale.html#band) and
3118+ # [`"point"`](scale.html#point)) output ranges.
3119+ #
3120+ # 3) [**Discretizing Scales**](scale.html#discretizing) -- mapping continuous domains to
3121+ # discrete output ranges ([`"bin-linear"`](scale.html#bin-linear) and
3122+ # [`"bin-ordinal"`](scale.html#bin-ordinal)).
3123+ #
3124+ # __Default value:__ please see the [scale type table](scale.html#type).
3125+ @[JSON::Field(key: "type")]
3126+ property scale_type : String?
3127+
3128+ # If `true`, ensures that a zero baseline value is included in the scale domain.
3129+ #
3130+ # __Default value:__ `true` for x and y channels if the quantitative field is not binned
3131+ # and no custom `domain` is provided; `false` otherwise.
3132+ #
3133+ # __Note:__ Log, time, and utc scales do not support `zero`.
3134+ property zero : Bool?
3135+end
3136+
3137+class DomainClass
3138+ include JSON::Serializable
3139+
3140+ # The field name to extract selected values for, when a selection is
3141+ # [projected](project.html)
3142+ # over multiple fields or encodings.
3143+ property field : String?
3144+
3145+ # The name of a selection.
3146+ property selection : String
3147+
3148+ # The encoding channel to extract selected values for, when a selection is
3149+ # [projected](project.html)
3150+ # over multiple fields or encodings.
3151+ property encoding : String?
3152+end
3153+
3154+class InterpolateParams
3155+ include JSON::Serializable
3156+
3157+ property gamma : Float64?
3158+
3159+ @[JSON::Field(key: "type")]
3160+ property interpolate_params_type : String
3161+end
3162+
3163+class NiceClass
3164+ include JSON::Serializable
3165+
3166+ property interval : String
3167+
3168+ property step : Float64
3169+end
3170+
3171+class SchemeParams
3172+ include JSON::Serializable
3173+
3174+ # For sequential and diverging schemes only, determines the extent of the color range to
3175+ # use. For example `[0.2, 1]` will rescale the color scheme such that color values in the
3176+ # range _[0, 0.2)_ are excluded from the scheme.
3177+ property extent : Array(Float64)?
3178+
3179+ # A color scheme name for sequential/ordinal scales (e.g., `"category10"` or `"viridis"`).
3180+ #
3181+ # For the full list of supported scheme, please refer to the [Vega
3182+ # Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.
3183+ property name : String
3184+end
3185+
3186+class SortField
3187+ include JSON::Serializable
3188+
3189+ # The data [field](field.html) to sort by.
3190+ #
3191+ # __Default value:__ If unspecified, defaults to the field specified in the outer data
3192+ # reference.
3193+ property field : Field?
3194+
3195+ # An [aggregate operation](aggregate.html#ops) to perform on the field prior to sorting
3196+ # (e.g., `"count"`, `"mean"` and `"median"`).
3197+ # This property is required in cases where the sort field and the data reference field do
3198+ # not match.
3199+ # The input data objects will be aggregated, grouped by the encoded data field.
3200+ #
3201+ # For a full list of operations, please see the documentation for
3202+ # [aggregate](aggregate.html#ops).
3203+ property op : String
3204+
3205+ # The sort order. One of `"ascending"` (default) or `"descending"`.
3206+ property order : String?
3207+end
3208+
3209+# Horizontal facets for trellis plots.
3210+#
3211+# Vertical facets for trellis plots.
3212+class FacetFieldDef
3213+ include JSON::Serializable
3214+
3215+ # Aggregation function for the field
3216+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
3217+ #
3218+ # __Default value:__ `undefined` (None)
3219+ property aggregate : String?
3220+
3221+ # A flag for binning a `quantitative` field, or [an object defining binning
3222+ # parameters](bin.html#params).
3223+ # If `true`, default [binning parameters](bin.html) will be applied.
3224+ #
3225+ # __Default value:__ `false`
3226+ property bin : Bin?
3227+
3228+ # __Required.__ A string defining the name of the field from which to pull a data value
3229+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
3230+ #
3231+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3232+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
3233+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
3234+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
3235+ # See more details about escaping in the [field documentation](field.html).
3236+ #
3237+ # __Note:__ `field` is not required if `aggregate` is `count`.
3238+ property field : Field?
3239+
3240+ # An object defining properties of a facet's header.
3241+ property header : Header?
3242+
3243+ # Sort order for a facet field.
3244+ # This can be `"ascending"`, `"descending"`.
3245+ property sort : String?
3246+
3247+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
3248+ # or [a temporal field that gets casted as ordinal](type.html#cast).
3249+ #
3250+ # __Default value:__ `undefined` (None)
3251+ @[JSON::Field(key: "timeUnit")]
3252+ property time_unit : String?
3253+
3254+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
3255+ # `"nominal"`).
3256+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
3257+ # [geographic projection](projection.html) is applied.
3258+ @[JSON::Field(key: "type")]
3259+ property facet_field_def_type : String
3260+end
3261+
3262+# An object defining properties of a facet's header.
3263+#
3264+# Headers of row / column channels for faceted plots.
3265+class Header
3266+ include JSON::Serializable
3267+
3268+ # The formatting pattern for labels. This is D3's [number format
3269+ # pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's
3270+ # [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time
3271+ # field.
3272+ #
3273+ # See the [format documentation](format.html) for more information.
3274+ #
3275+ # __Default value:__ derived from [numberFormat](config.html#format) config for
3276+ # quantitative fields and from [timeFormat](config.html#format) config for temporal fields.
3277+ property format : String?
3278+
3279+ # The rotation angle of the header labels.
3280+ #
3281+ # __Default value:__ `0`.
3282+ @[JSON::Field(key: "labelAngle")]
3283+ property label_angle : Float64?
3284+
3285+ # A title for the field. If `null`, the title will be removed.
3286+ #
3287+ # __Default value:__ derived from the field's name and transformation function
3288+ # (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the
3289+ # function is displayed as a part of the title (e.g., `"Sum of Profit"`). If the field is
3290+ # binned or has a time unit applied, the applied function will be denoted in parentheses
3291+ # (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is
3292+ # simply the field name.
3293+ #
3294+ # __Note__: You can customize the default field title format by providing the [`fieldTitle`
3295+ # property in the [config](config.html) or [`fieldTitle` function via the `compile`
3296+ # function's options](compile.html#field-title).
3297+ property title : String?
3298+end
3299+
3300+# Definition object for a data field, its type and transformation of an encoding channel.
3301+class FieldDef
3302+ include JSON::Serializable
3303+
3304+ # Aggregation function for the field
3305+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
3306+ #
3307+ # __Default value:__ `undefined` (None)
3308+ property aggregate : String?
3309+
3310+ # A flag for binning a `quantitative` field, or [an object defining binning
3311+ # parameters](bin.html#params).
3312+ # If `true`, default [binning parameters](bin.html) will be applied.
3313+ #
3314+ # __Default value:__ `false`
3315+ property bin : Bin?
3316+
3317+ # __Required.__ A string defining the name of the field from which to pull a data value
3318+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
3319+ #
3320+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3321+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
3322+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
3323+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
3324+ # See more details about escaping in the [field documentation](field.html).
3325+ #
3326+ # __Note:__ `field` is not required if `aggregate` is `count`.
3327+ property field : Field?
3328+
3329+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
3330+ # or [a temporal field that gets casted as ordinal](type.html#cast).
3331+ #
3332+ # __Default value:__ `undefined` (None)
3333+ @[JSON::Field(key: "timeUnit")]
3334+ property time_unit : String?
3335+
3336+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
3337+ # `"nominal"`).
3338+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
3339+ # [geographic projection](projection.html) is applied.
3340+ @[JSON::Field(key: "type")]
3341+ property field_def_type : String
3342+end
3343+
3344+# A URL to load upon mouse click.
3345+#
3346+# A FieldDef with Condition<ValueDef>
3347+# {
3348+# condition: {value: ...},
3349+# field: ...,
3350+# ...
3351+# }
3352+#
3353+# A ValueDef with Condition<ValueDef | FieldDef>
3354+# {
3355+# condition: {field: ...} | {value: ...},
3356+# value: ...,
3357+# }
3358+class DefWithCondition
3359+ include JSON::Serializable
3360+
3361+ # Aggregation function for the field
3362+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
3363+ #
3364+ # __Default value:__ `undefined` (None)
3365+ property aggregate : String?
3366+
3367+ # A flag for binning a `quantitative` field, or [an object defining binning
3368+ # parameters](bin.html#params).
3369+ # If `true`, default [binning parameters](bin.html) will be applied.
3370+ #
3371+ # __Default value:__ `false`
3372+ property bin : Bin?
3373+
3374+ # One or more value definition(s) with a selection predicate.
3375+ #
3376+ # __Note:__ A field definition's `condition` property can only contain [value
3377+ # definitions](encoding.html#value-def)
3378+ # since Vega-Lite only allows at most one encoded field per encoding channel.
3379+ #
3380+ # A field definition or one or more value definition(s) with a selection predicate.
3381+ property condition : HrefCondition?
3382+
3383+ # __Required.__ A string defining the name of the field from which to pull a data value
3384+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
3385+ #
3386+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3387+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
3388+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
3389+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
3390+ # See more details about escaping in the [field documentation](field.html).
3391+ #
3392+ # __Note:__ `field` is not required if `aggregate` is `count`.
3393+ property field : Field?
3394+
3395+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
3396+ # or [a temporal field that gets casted as ordinal](type.html#cast).
3397+ #
3398+ # __Default value:__ `undefined` (None)
3399+ @[JSON::Field(key: "timeUnit")]
3400+ property time_unit : String?
3401+
3402+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
3403+ # `"nominal"`).
3404+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
3405+ # [geographic projection](projection.html) is applied.
3406+ @[JSON::Field(key: "type")]
3407+ property def_with_condition_type : String?
3408+
3409+ # A constant value in visual domain.
3410+ property value : ConditionalPredicateValueDefValue?
3411+end
3412+
3413+class ConditionalPredicateFieldDefClass
3414+ include JSON::Serializable
3415+
3416+ property test : ConditionalValueDefLogicalOperandPredicate?
3417+
3418+ # A constant value in visual domain (e.g., `"red"` / "#0099ff" for color, values between
3419+ # `0` to `1` for opacity).
3420+ property value : ConditionalPredicateValueDefValue?
3421+
3422+ # A [selection name](selection.html), or a series of [composed
3423+ # selections](selection.html#compose).
3424+ property selection : ConditionalValueDefSelectionOperand?
3425+
3426+ # Aggregation function for the field
3427+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
3428+ #
3429+ # __Default value:__ `undefined` (None)
3430+ property aggregate : String?
3431+
3432+ # A flag for binning a `quantitative` field, or [an object defining binning
3433+ # parameters](bin.html#params).
3434+ # If `true`, default [binning parameters](bin.html) will be applied.
3435+ #
3436+ # __Default value:__ `false`
3437+ property bin : Bin?
3438+
3439+ # __Required.__ A string defining the name of the field from which to pull a data value
3440+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
3441+ #
3442+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3443+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
3444+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
3445+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
3446+ # See more details about escaping in the [field documentation](field.html).
3447+ #
3448+ # __Note:__ `field` is not required if `aggregate` is `count`.
3449+ property field : Field?
3450+
3451+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
3452+ # or [a temporal field that gets casted as ordinal](type.html#cast).
3453+ #
3454+ # __Default value:__ `undefined` (None)
3455+ @[JSON::Field(key: "timeUnit")]
3456+ property time_unit : String?
3457+
3458+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
3459+ # `"nominal"`).
3460+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
3461+ # [geographic projection](projection.html) is applied.
3462+ @[JSON::Field(key: "type")]
3463+ property conditional_def_type : String?
3464+end
3465+
3466+class OrderFieldDef
3467+ include JSON::Serializable
3468+
3469+ # Aggregation function for the field
3470+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
3471+ #
3472+ # __Default value:__ `undefined` (None)
3473+ property aggregate : String?
3474+
3475+ # A flag for binning a `quantitative` field, or [an object defining binning
3476+ # parameters](bin.html#params).
3477+ # If `true`, default [binning parameters](bin.html) will be applied.
3478+ #
3479+ # __Default value:__ `false`
3480+ property bin : Bin?
3481+
3482+ # __Required.__ A string defining the name of the field from which to pull a data value
3483+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
3484+ #
3485+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3486+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
3487+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
3488+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
3489+ # See more details about escaping in the [field documentation](field.html).
3490+ #
3491+ # __Note:__ `field` is not required if `aggregate` is `count`.
3492+ property field : Field?
3493+
3494+ # The sort order. One of `"ascending"` (default) or `"descending"`.
3495+ property sort : String?
3496+
3497+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
3498+ # or [a temporal field that gets casted as ordinal](type.html#cast).
3499+ #
3500+ # __Default value:__ `undefined` (None)
3501+ @[JSON::Field(key: "timeUnit")]
3502+ property time_unit : String?
3503+
3504+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
3505+ # `"nominal"`).
3506+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
3507+ # [geographic projection](projection.html) is applied.
3508+ @[JSON::Field(key: "type")]
3509+ property order_field_def_type : String
3510+end
3511+
3512+# Text of the `text` mark.
3513+#
3514+# The tooltip text to show upon mouse hover.
3515+#
3516+# A FieldDef with Condition<ValueDef>
3517+# {
3518+# condition: {value: ...},
3519+# field: ...,
3520+# ...
3521+# }
3522+#
3523+# A ValueDef with Condition<ValueDef | FieldDef>
3524+# {
3525+# condition: {field: ...} | {value: ...},
3526+# value: ...,
3527+# }
3528+class TextDefWithCondition
3529+ include JSON::Serializable
3530+
3531+ # Aggregation function for the field
3532+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
3533+ #
3534+ # __Default value:__ `undefined` (None)
3535+ property aggregate : String?
3536+
3537+ # A flag for binning a `quantitative` field, or [an object defining binning
3538+ # parameters](bin.html#params).
3539+ # If `true`, default [binning parameters](bin.html) will be applied.
3540+ #
3541+ # __Default value:__ `false`
3542+ property bin : Bin?
3543+
3544+ # One or more value definition(s) with a selection predicate.
3545+ #
3546+ # __Note:__ A field definition's `condition` property can only contain [value
3547+ # definitions](encoding.html#value-def)
3548+ # since Vega-Lite only allows at most one encoded field per encoding channel.
3549+ #
3550+ # A field definition or one or more value definition(s) with a selection predicate.
3551+ property condition : TextCondition?
3552+
3553+ # __Required.__ A string defining the name of the field from which to pull a data value
3554+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
3555+ #
3556+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3557+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
3558+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
3559+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
3560+ # See more details about escaping in the [field documentation](field.html).
3561+ #
3562+ # __Note:__ `field` is not required if `aggregate` is `count`.
3563+ property field : Field?
3564+
3565+ # The [formatting pattern](format.html) for a text field. If not defined, this will be
3566+ # determined automatically.
3567+ property format : String?
3568+
3569+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
3570+ # or [a temporal field that gets casted as ordinal](type.html#cast).
3571+ #
3572+ # __Default value:__ `undefined` (None)
3573+ @[JSON::Field(key: "timeUnit")]
3574+ property time_unit : String?
3575+
3576+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
3577+ # `"nominal"`).
3578+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
3579+ # [geographic projection](projection.html) is applied.
3580+ @[JSON::Field(key: "type")]
3581+ property text_def_with_condition_type : String?
3582+
3583+ # A constant value in visual domain.
3584+ property value : ConditionalPredicateValueDefValue?
3585+end
3586+
3587+class ConditionalPredicateTextFieldDefClass
3588+ include JSON::Serializable
3589+
3590+ property test : ConditionalValueDefLogicalOperandPredicate?
3591+
3592+ # A constant value in visual domain (e.g., `"red"` / "#0099ff" for color, values between
3593+ # `0` to `1` for opacity).
3594+ property value : ConditionalPredicateValueDefValue?
3595+
3596+ # A [selection name](selection.html), or a series of [composed
3597+ # selections](selection.html#compose).
3598+ property selection : ConditionalValueDefSelectionOperand?
3599+
3600+ # Aggregation function for the field
3601+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
3602+ #
3603+ # __Default value:__ `undefined` (None)
3604+ property aggregate : String?
3605+
3606+ # A flag for binning a `quantitative` field, or [an object defining binning
3607+ # parameters](bin.html#params).
3608+ # If `true`, default [binning parameters](bin.html) will be applied.
3609+ #
3610+ # __Default value:__ `false`
3611+ property bin : Bin?
3612+
3613+ # __Required.__ A string defining the name of the field from which to pull a data value
3614+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
3615+ #
3616+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3617+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
3618+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
3619+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
3620+ # See more details about escaping in the [field documentation](field.html).
3621+ #
3622+ # __Note:__ `field` is not required if `aggregate` is `count`.
3623+ property field : Field?
3624+
3625+ # The [formatting pattern](format.html) for a text field. If not defined, this will be
3626+ # determined automatically.
3627+ property format : String?
3628+
3629+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
3630+ # or [a temporal field that gets casted as ordinal](type.html#cast).
3631+ #
3632+ # __Default value:__ `undefined` (None)
3633+ @[JSON::Field(key: "timeUnit")]
3634+ property time_unit : String?
3635+
3636+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
3637+ # `"nominal"`).
3638+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
3639+ # [geographic projection](projection.html) is applied.
3640+ @[JSON::Field(key: "type")]
3641+ property conditional_def_type : String?
3642+end
3643+
3644+# X coordinates of the marks, or width of horizontal `"bar"` and `"area"`.
3645+#
3646+# Y coordinates of the marks, or height of vertical `"bar"` and `"area"`.
3647+#
3648+# Definition object for a constant value of an encoding channel.
3649+class XClass
3650+ include JSON::Serializable
3651+
3652+ # Aggregation function for the field
3653+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
3654+ #
3655+ # __Default value:__ `undefined` (None)
3656+ property aggregate : String?
3657+
3658+ # An object defining properties of axis's gridlines, ticks and labels.
3659+ # If `null`, the axis for the encoding channel will be removed.
3660+ #
3661+ # __Default value:__ If undefined, default [axis properties](axis.html) are applied.
3662+ property axis : Axis?
3663+
3664+ # A flag for binning a `quantitative` field, or [an object defining binning
3665+ # parameters](bin.html#params).
3666+ # If `true`, default [binning parameters](bin.html) will be applied.
3667+ #
3668+ # __Default value:__ `false`
3669+ property bin : Bin?
3670+
3671+ # __Required.__ A string defining the name of the field from which to pull a data value
3672+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
3673+ #
3674+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3675+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
3676+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
3677+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
3678+ # See more details about escaping in the [field documentation](field.html).
3679+ #
3680+ # __Note:__ `field` is not required if `aggregate` is `count`.
3681+ property field : Field?
3682+
3683+ # An object defining properties of the channel's scale, which is the function that
3684+ # transforms values in the data domain (numbers, dates, strings, etc) to visual values
3685+ # (pixels, colors, sizes) of the encoding channels.
3686+ #
3687+ # __Default value:__ If undefined, default [scale properties](scale.html) are applied.
3688+ property scale : Scale?
3689+
3690+ # Sort order for the encoded field.
3691+ # Supported `sort` values include `"ascending"`, `"descending"` and `null` (no sorting).
3692+ # For fields with discrete domains, `sort` can also be a [sort field definition
3693+ # object](sort.html#sort-field).
3694+ #
3695+ # __Default value:__ `"ascending"`
3696+ property sort : SortUnion?
3697+
3698+ # Type of stacking offset if the field should be stacked.
3699+ # `stack` is only applicable for `x` and `y` channels with continuous domains.
3700+ # For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.
3701+ #
3702+ # `stack` can be one of the following values:
3703+ #
3704+ # - `"zero"`: stacking with baseline offset at zero value of the scale (for creating
3705+ # typical stacked [bar](stack.html#bar) and [area](stack.html#area) chart).
3706+ # - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar
3707+ # and area charts](stack.html#normalized). <br/>
3708+ # - `"center"` - stacking with center baseline (for [streamgraph](stack.html#streamgraph)).
3709+ # - `null` - No-stacking. This will produce layered [bar](stack.html#layered-bar-chart) and
3710+ # area chart.
3711+ #
3712+ # __Default value:__ `zero` for plots with all of the following conditions are true:
3713+ #
3714+ # 1. The mark is `bar` or `area`;
3715+ # 2. The stacked measure channel (x or y) has a linear scale;
3716+ # 3. At least one of non-position channels mapped to an unaggregated field that is
3717+ # different from x and y. Otherwise, `null` by default.
3718+ property stack : String?
3719+
3720+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
3721+ # or [a temporal field that gets casted as ordinal](type.html#cast).
3722+ #
3723+ # __Default value:__ `undefined` (None)
3724+ @[JSON::Field(key: "timeUnit")]
3725+ property time_unit : String?
3726+
3727+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
3728+ # `"nominal"`).
3729+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
3730+ # [geographic projection](projection.html) is applied.
3731+ @[JSON::Field(key: "type")]
3732+ property def_type : String?
3733+
3734+ # A constant value in visual domain (e.g., `"red"` / "#0099ff" for color, values between
3735+ # `0` to `1` for opacity).
3736+ property value : ConditionalPredicateValueDefValue?
3737+end
3738+
3739+class Axis
3740+ include JSON::Serializable
3741+
3742+ # A boolean flag indicating if the domain (the axis baseline) should be included as part of
3743+ # the axis.
3744+ #
3745+ # __Default value:__ `true`
3746+ property domain : Bool?
3747+
3748+ # The formatting pattern for labels. This is D3's [number format
3749+ # pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's
3750+ # [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time
3751+ # field.
3752+ #
3753+ # See the [format documentation](format.html) for more information.
3754+ #
3755+ # __Default value:__ derived from [numberFormat](config.html#format) config for
3756+ # quantitative fields and from [timeFormat](config.html#format) config for temporal fields.
3757+ property format : String?
3758+
3759+ # A boolean flag indicating if grid lines should be included as part of the axis
3760+ #
3761+ # __Default value:__ `true` for [continuous scales](scale.html#continuous) that are not
3762+ # binned; otherwise, `false`.
3763+ property grid : Bool?
3764+
3765+ # The rotation angle of the axis labels.
3766+ #
3767+ # __Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.
3768+ @[JSON::Field(key: "labelAngle")]
3769+ property label_angle : Float64?
3770+
3771+ # Indicates if labels should be hidden if they exceed the axis range. If `false `(the
3772+ # default) no bounds overlap analysis is performed. If `true`, labels will be hidden if
3773+ # they exceed the axis range by more than 1 pixel. If this property is a number, it
3774+ # specifies the pixel tolerance: the maximum amount by which a label bounding box may
3775+ # exceed the axis range.
3776+ #
3777+ # __Default value:__ `false`.
3778+ @[JSON::Field(key: "labelBound")]
3779+ property label_bound : Label?
3780+
3781+ # Indicates if the first and last axis labels should be aligned flush with the scale range.
3782+ # Flush alignment for a horizontal axis will left-align the first label and right-align the
3783+ # last label. For vertical axes, bottom and top text baselines are applied instead. If this
3784+ # property is a number, it also indicates the number of pixels by which to offset the first
3785+ # and last labels; for example, a value of 2 will flush-align the first and last labels and
3786+ # also push them 2 pixels outward from the center of the axis. The additional adjustment
3787+ # can sometimes help the labels better visually group with corresponding axis ticks.
3788+ #
3789+ # __Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.
3790+ @[JSON::Field(key: "labelFlush")]
3791+ property label_flush : Label?
3792+
3793+ # The strategy to use for resolving overlap of axis labels. If `false` (the default), no
3794+ # overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing
3795+ # every other label is used (this works well for standard linear axes). If set to
3796+ # `"greedy"`, a linear scan of the labels is performed, removing any labels that overlaps
3797+ # with the last visible label (this often works better for log-scaled axes).
3798+ #
3799+ # __Default value:__ `true` for non-nominal fields with non-log scales; `"greedy"` for log
3800+ # scales; otherwise `false`.
3801+ @[JSON::Field(key: "labelOverlap")]
3802+ property label_overlap : LabelOverlapUnion?
3803+
3804+ # The padding, in pixels, between axis and text labels.
3805+ @[JSON::Field(key: "labelPadding")]
3806+ property label_padding : Float64?
3807+
3808+ # A boolean flag indicating if labels should be included as part of the axis.
3809+ #
3810+ # __Default value:__ `true`.
3811+ property labels : Bool?
3812+
3813+ # The maximum extent in pixels that axis ticks and labels should use. This determines a
3814+ # maximum offset value for axis titles.
3815+ #
3816+ # __Default value:__ `undefined`.
3817+ @[JSON::Field(key: "maxExtent")]
3818+ property max_extent : Float64?
3819+
3820+ # The minimum extent in pixels that axis ticks and labels should use. This determines a
3821+ # minimum offset value for axis titles.
3822+ #
3823+ # __Default value:__ `30` for y-axis; `undefined` for x-axis.
3824+ @[JSON::Field(key: "minExtent")]
3825+ property min_extent : Float64?
3826+
3827+ # The offset, in pixels, by which to displace the axis from the edge of the enclosing group
3828+ # or data rectangle.
3829+ #
3830+ # __Default value:__ derived from the [axis config](config.html#facet-scale-config)'s
3831+ # `offset` (`0` by default)
3832+ property offset : Float64?
3833+
3834+ # The orientation of the axis. One of `"top"`, `"bottom"`, `"left"` or `"right"`. The
3835+ # orientation can be used to further specialize the axis type (e.g., a y axis oriented for
3836+ # the right edge of the chart).
3837+ #
3838+ # __Default value:__ `"bottom"` for x-axes and `"left"` for y-axes.
3839+ property orient : String?
3840+
3841+ # The anchor position of the axis in pixels. For x-axis with top or bottom orientation,
3842+ # this sets the axis group x coordinate. For y-axis with left or right orientation, this
3843+ # sets the axis group y coordinate.
3844+ #
3845+ # __Default value__: `0`
3846+ property position : Float64?
3847+
3848+ # A desired number of ticks, for axes visualizing quantitative scales. The resulting number
3849+ # may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the
3850+ # underlying scale's range.
3851+ @[JSON::Field(key: "tickCount")]
3852+ property tick_count : Float64?
3853+
3854+ # Boolean value that determines whether the axis should include ticks.
3855+ property ticks : Bool?
3856+
3857+ # The size in pixels of axis ticks.
3858+ @[JSON::Field(key: "tickSize")]
3859+ property tick_size : Float64?
3860+
3861+ # A title for the field. If `null`, the title will be removed.
3862+ #
3863+ # __Default value:__ derived from the field's name and transformation function
3864+ # (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the
3865+ # function is displayed as a part of the title (e.g., `"Sum of Profit"`). If the field is
3866+ # binned or has a time unit applied, the applied function will be denoted in parentheses
3867+ # (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is
3868+ # simply the field name.
3869+ #
3870+ # __Note__: You can customize the default field title format by providing the [`fieldTitle`
3871+ # property in the [config](config.html) or [`fieldTitle` function via the `compile`
3872+ # function's options](compile.html#field-title).
3873+ property title : String?
3874+
3875+ # Max length for axis title if the title is automatically generated from the field's
3876+ # description.
3877+ @[JSON::Field(key: "titleMaxLength")]
3878+ property title_max_length : Float64?
3879+
3880+ # The padding, in pixels, between title and axis.
3881+ @[JSON::Field(key: "titlePadding")]
3882+ property title_padding : Float64?
3883+
3884+ # Explicitly set the visible axis tick values.
3885+ property values : Array(AxisValue)?
3886+
3887+ # A non-positive integer indicating z-index of the axis.
3888+ # If zindex is 0, axes should be drawn behind all chart elements.
3889+ # To put them in front, use `"zindex = 1"`.
3890+ #
3891+ # __Default value:__ `1` (in front of the marks) for actual axis and `0` (behind the marks)
3892+ # for grids.
3893+ property zindex : Float64?
3894+end
3895+
3896+# X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and `"rule"`.
3897+#
3898+# Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and `"rule"`.
3899+#
3900+# Definition object for a data field, its type and transformation of an encoding channel.
3901+#
3902+# Definition object for a constant value of an encoding channel.
3903+class X2Class
3904+ include JSON::Serializable
3905+
3906+ # Aggregation function for the field
3907+ # (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).
3908+ #
3909+ # __Default value:__ `undefined` (None)
3910+ property aggregate : String?
3911+
3912+ # A flag for binning a `quantitative` field, or [an object defining binning
3913+ # parameters](bin.html#params).
3914+ # If `true`, default [binning parameters](bin.html) will be applied.
3915+ #
3916+ # __Default value:__ `false`
3917+ property bin : Bin?
3918+
3919+ # __Required.__ A string defining the name of the field from which to pull a data value
3920+ # or an object defining iterated values from the [`repeat`](repeat.html) operator.
3921+ #
3922+ # __Note:__ Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3923+ # (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`).
3924+ # If field names contain dots or brackets but are not nested, you can use `\\` to escape
3925+ # dots and brackets (e.g., `"a\\.b"` and `"a\\[0\\]"`).
3926+ # See more details about escaping in the [field documentation](field.html).
3927+ #
3928+ # __Note:__ `field` is not required if `aggregate` is `count`.
3929+ property field : Field?
3930+
3931+ # Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.
3932+ # or [a temporal field that gets casted as ordinal](type.html#cast).
3933+ #
3934+ # __Default value:__ `undefined` (None)
3935+ @[JSON::Field(key: "timeUnit")]
3936+ property time_unit : String?
3937+
3938+ # The encoded field's type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or
3939+ # `"nominal"`).
3940+ # It can also be a geo type (`"latitude"`, `"longitude"`, and `"geojson"`) when a
3941+ # [geographic projection](projection.html) is applied.
3942+ @[JSON::Field(key: "type")]
3943+ property def_type : String?
3944+
3945+ # A constant value in visual domain (e.g., `"red"` / "#0099ff" for color, values between
3946+ # `0` to `1` for opacity).
3947+ property value : ConditionalPredicateValueDefValue?
3948+end
3949+
3950+# An object that describes mappings between `row` and `column` channels and their field
3951+# definitions.
3952+class FacetMapping
3953+ include JSON::Serializable
3954+
3955+ # Horizontal facets for trellis plots.
3956+ property column : FacetFieldDef?
3957+
3958+ # Vertical facets for trellis plots.
3959+ property row : FacetFieldDef?
3960+end
3961+
3962+# Unit spec that can have a composite mark.
3963+class SpecElement
3964+ include JSON::Serializable
3965+
3966+ # An object describing the data source
3967+ property data : Data?
3968+
3969+ # Description of this mark for commenting purpose.
3970+ property description : String?
3971+
3972+ # The height of a visualization.
3973+ #
3974+ # __Default value:__
3975+ # - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its y-channel has a
3976+ # [continuous scale](scale.html#continuous), the height will be the value of
3977+ # [`config.view.height`](spec.html#config).
3978+ # - For y-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric
3979+ # value or unspecified, the height is [determined by the range step, paddings, and the
3980+ # cardinality of the field mapped to y-channel](scale.html#band). Otherwise, if the
3981+ # `rangeStep` is `null`, the height will be the value of
3982+ # [`config.view.height`](spec.html#config).
3983+ # - If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.
3984+ #
3985+ # __Note__: For plots with [`row` and `column` channels](encoding.html#facet), this
3986+ # represents the height of a single view.
3987+ #
3988+ # __See also:__ The documentation for [width and height](size.html) contains more examples.
3989+ property height : Float64?
3990+
3991+ # Layer or single view specifications to be layered.
3992+ #
3993+ # __Note__: Specifications inside `layer` cannot use `row` and `column` channels as
3994+ # layering facet specifications is not allowed.
3995+ property layer : Array(LayerSpec)?
3996+
3997+ # Name of the visualization for later reference.
3998+ property name : String?
3999+
4000+ # Scale, axis, and legend resolutions for layers.
4001+ #
4002+ # Scale, axis, and legend resolutions for facets.
4003+ #
4004+ # Scale and legend resolutions for repeated charts.
4005+ #
4006+ # Scale, axis, and legend resolutions for vertically concatenated charts.
4007+ #
4008+ # Scale, axis, and legend resolutions for horizontally concatenated charts.
4009+ property resolve : Resolve?
4010+
4011+ # Title for the plot.
4012+ property title : Title?
4013+
4014+ # An array of data transformations such as filter and new field calculation.
4015+ property transform : Array(Transform)?
4016+
4017+ # The width of a visualization.
4018+ #
4019+ # __Default value:__ This will be determined by the following rules:
4020+ #
4021+ # - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its x-channel has a
4022+ # [continuous scale](scale.html#continuous), the width will be the value of
4023+ # [`config.view.width`](spec.html#config).
4024+ # - For x-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric
4025+ # value or unspecified, the width is [determined by the range step, paddings, and the
4026+ # cardinality of the field mapped to x-channel](scale.html#band). Otherwise, if the
4027+ # `rangeStep` is `null`, the width will be the value of
4028+ # [`config.view.width`](spec.html#config).
4029+ # - If no field is mapped to `x` channel, the `width` will be the value of
4030+ # [`config.scale.textXRangeStep`](size.html#default-width-and-height) for `text` mark and
4031+ # the value of `rangeStep` for other marks.
4032+ #
4033+ # __Note:__ For plots with [`row` and `column` channels](encoding.html#facet), this
4034+ # represents the width of a single view.
4035+ #
4036+ # __See also:__ The documentation for [width and height](size.html) contains more examples.
4037+ property width : Float64?
4038+
4039+ # A key-value mapping between encoding channels and definition of fields.
4040+ property encoding : Encoding?
4041+
4042+ # A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
4043+ # `"line"`,
4044+ # * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition
4045+ # object](mark.html#mark-def).
4046+ property mark : AnyMark?
4047+
4048+ # An object defining properties of geographic projection.
4049+ #
4050+ # Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or
4051+ # more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`.
4052+ property projection : Projection?
4053+
4054+ # A key-value mapping between selection names and definitions.
4055+ property selection : Hash(String, SelectionDef)?
4056+
4057+ # An object that describes mappings between `row` and `column` channels and their field
4058+ # definitions.
4059+ property facet : FacetMapping?
4060+
4061+ # A specification of the view that gets faceted.
4062+ property spec : SpecElement?
4063+
4064+ # An object that describes what fields should be repeated into views that are laid out as a
4065+ # `row` or `column`.
4066+ property repeat : Repeat?
4067+
4068+ # A list of views that should be concatenated and put into a column.
4069+ property vconcat : Array(SpecElement)?
4070+
4071+ # A list of views that should be concatenated and put into a row.
4072+ property hconcat : Array(SpecElement)?
4073+end
4074+
4075+# A key-value mapping between encoding channels and definition of fields.
4076+class Encoding
4077+ include JSON::Serializable
4078+
4079+ # Color of the marks – either fill or stroke color based on mark type.
4080+ # By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`,
4081+ # `"text"`, `"circle"`, and `"square"` / stroke color for `"line"` and `"point"`.
4082+ #
4083+ # __Default value:__ If undefined, the default color depends on [mark
4084+ # config](config.html#mark)'s `color` property.
4085+ #
4086+ # _Note:_ See the scale documentation for more information about customizing [color
4087+ # scheme](scale.html#scheme).
4088+ property color : MarkPropDefWithCondition?
4089+
4090+ # Additional levels of detail for grouping data in aggregate views and
4091+ # in line and area marks without mapping data to a specific visual channel.
4092+ property detail : Detail?
4093+
4094+ # A URL to load upon mouse click.
4095+ property href : DefWithCondition?
4096+
4097+ # Opacity of the marks – either can be a value or a range.
4098+ #
4099+ # __Default value:__ If undefined, the default opacity depends on [mark
4100+ # config](config.html#mark)'s `opacity` property.
4101+ property opacity : MarkPropDefWithCondition?
4102+
4103+ # Stack order for stacked marks or order of data points in line marks for connected scatter
4104+ # plots.
4105+ #
4106+ # __Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating
4107+ # additional aggregation grouping.
4108+ property order : Order?
4109+
4110+ # For `point` marks the supported values are
4111+ # `"circle"` (default), `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`,
4112+ # or `"triangle-down"`, or else a custom SVG path string.
4113+ # For `geoshape` marks it should be a field definition of the geojson data
4114+ #
4115+ # __Default value:__ If undefined, the default shape depends on [mark
4116+ # config](config.html#point-config)'s `shape` property.
4117+ property shape : MarkPropDefWithCondition?
4118+
4119+ # Size of the mark.
4120+ # - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
4121+ # - For `"bar"` and `"tick"` – the bar and tick's size.
4122+ # - For `"text"` – the text's font size.
4123+ # - Size is currently unsupported for `"line"`, `"area"`, and `"rect"`.
4124+ property size : MarkPropDefWithCondition?
4125+
4126+ # Text of the `text` mark.
4127+ property text : TextDefWithCondition?
4128+
4129+ # The tooltip text to show upon mouse hover.
4130+ property tooltip : TextDefWithCondition?
4131+
4132+ # X coordinates of the marks, or width of horizontal `"bar"` and `"area"`.
4133+ property x : XClass?
4134+
4135+ # X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and `"rule"`.
4136+ property x2 : X2Class?
4137+
4138+ # Y coordinates of the marks, or height of vertical `"bar"` and `"area"`.
4139+ property y : XClass?
4140+
4141+ # Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and `"rule"`.
4142+ property y2 : X2Class?
4143+end
4144+
4145+# Unit spec that can have a composite mark.
4146+class LayerSpec
4147+ include JSON::Serializable
4148+
4149+ # An object describing the data source
4150+ property data : Data?
4151+
4152+ # Description of this mark for commenting purpose.
4153+ property description : String?
4154+
4155+ # The height of a visualization.
4156+ #
4157+ # __Default value:__
4158+ # - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its y-channel has a
4159+ # [continuous scale](scale.html#continuous), the height will be the value of
4160+ # [`config.view.height`](spec.html#config).
4161+ # - For y-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric
4162+ # value or unspecified, the height is [determined by the range step, paddings, and the
4163+ # cardinality of the field mapped to y-channel](scale.html#band). Otherwise, if the
4164+ # `rangeStep` is `null`, the height will be the value of
4165+ # [`config.view.height`](spec.html#config).
4166+ # - If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`.
4167+ #
4168+ # __Note__: For plots with [`row` and `column` channels](encoding.html#facet), this
4169+ # represents the height of a single view.
4170+ #
4171+ # __See also:__ The documentation for [width and height](size.html) contains more examples.
4172+ property height : Float64?
4173+
4174+ # Layer or single view specifications to be layered.
4175+ #
4176+ # __Note__: Specifications inside `layer` cannot use `row` and `column` channels as
4177+ # layering facet specifications is not allowed.
4178+ property layer : Array(LayerSpec)?
4179+
4180+ # Name of the visualization for later reference.
4181+ property name : String?
4182+
4183+ # Scale, axis, and legend resolutions for layers.
4184+ property resolve : Resolve?
4185+
4186+ # Title for the plot.
4187+ property title : Title?
4188+
4189+ # An array of data transformations such as filter and new field calculation.
4190+ property transform : Array(Transform)?
4191+
4192+ # The width of a visualization.
4193+ #
4194+ # __Default value:__ This will be determined by the following rules:
4195+ #
4196+ # - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its x-channel has a
4197+ # [continuous scale](scale.html#continuous), the width will be the value of
4198+ # [`config.view.width`](spec.html#config).
4199+ # - For x-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric
4200+ # value or unspecified, the width is [determined by the range step, paddings, and the
4201+ # cardinality of the field mapped to x-channel](scale.html#band). Otherwise, if the
4202+ # `rangeStep` is `null`, the width will be the value of
4203+ # [`config.view.width`](spec.html#config).
4204+ # - If no field is mapped to `x` channel, the `width` will be the value of
4205+ # [`config.scale.textXRangeStep`](size.html#default-width-and-height) for `text` mark and
4206+ # the value of `rangeStep` for other marks.
4207+ #
4208+ # __Note:__ For plots with [`row` and `column` channels](encoding.html#facet), this
4209+ # represents the width of a single view.
4210+ #
4211+ # __See also:__ The documentation for [width and height](size.html) contains more examples.
4212+ property width : Float64?
4213+
4214+ # A key-value mapping between encoding channels and definition of fields.
4215+ property encoding : Encoding?
4216+
4217+ # A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
4218+ # `"line"`,
4219+ # * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition
4220+ # object](mark.html#mark-def).
4221+ property mark : AnyMark?
4222+
4223+ # An object defining properties of geographic projection.
4224+ #
4225+ # Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or
4226+ # more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`.
4227+ property projection : Projection?
4228+
4229+ # A key-value mapping between selection names and definitions.
4230+ property selection : Hash(String, SelectionDef)?
4231+end
4232+
4233+class MarkDef
4234+ include JSON::Serializable
4235+
4236+ # The horizontal alignment of the text. One of `"left"`, `"right"`, `"center"`.
4237+ property align : String?
4238+
4239+ # The rotation angle of the text, in degrees.
4240+ property angle : Float64?
4241+
4242+ # The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
4243+ #
4244+ # __Default value:__ `"middle"`
4245+ property baseline : String?
4246+
4247+ # Whether a mark be clipped to the enclosing group’s width and height.
4248+ property clip : Bool?
4249+
4250+ # Default color. Note that `fill` and `stroke` have higher precedence than `color` and
4251+ # will override `color`.
4252+ #
4253+ # __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
4254+ #
4255+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
4256+ property color : String?
4257+
4258+ # The mouse cursor used over the mark. Any valid [CSS cursor
4259+ # type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
4260+ property cursor : String?
4261+
4262+ # The horizontal offset, in pixels, between the text label and its anchor point. The offset
4263+ # is applied after rotation by the _angle_ property.
4264+ property dx : Float64?
4265+
4266+ # The vertical offset, in pixels, between the text label and its anchor point. The offset
4267+ # is applied after rotation by the _angle_ property.
4268+ property dy : Float64?
4269+
4270+ # Default Fill Color. This has higher precedence than config.color
4271+ #
4272+ # __Default value:__ (None)
4273+ property fill : String?
4274+
4275+ # Whether the mark's color should be used as fill color instead of stroke color.
4276+ #
4277+ # __Default value:__ `true` for all marks except `point` and `false` for `point`.
4278+ #
4279+ # __Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.
4280+ #
4281+ # __Note:__ This property cannot be used in a [style config](mark.html#style-config).
4282+ property filled : Bool?
4283+
4284+ # The fill opacity (value between [0,1]).
4285+ #
4286+ # __Default value:__ `1`
4287+ @[JSON::Field(key: "fillOpacity")]
4288+ property fill_opacity : Float64?
4289+
4290+ # The typeface to set the text in (e.g., `"Helvetica Neue"`).
4291+ property font : String?
4292+
4293+ # The font size, in pixels.
4294+ @[JSON::Field(key: "fontSize")]
4295+ property font_size : Float64?
4296+
4297+ # The font style (e.g., `"italic"`).
4298+ @[JSON::Field(key: "fontStyle")]
4299+ property font_style : String?
4300+
4301+ # The font weight (e.g., `"bold"`).
4302+ @[JSON::Field(key: "fontWeight")]
4303+ property font_weight : FontWeightUnion?
4304+
4305+ # A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
4306+ property href : String?
4307+
4308+ # The line interpolation method to use for line and area marks. One of the following:
4309+ # - `"linear"`: piecewise linear segments, as in a polyline.
4310+ # - `"linear-closed"`: close the linear segments to form a polygon.
4311+ # - `"step"`: alternate between horizontal and vertical segments, as in a step function.
4312+ # - `"step-before"`: alternate between vertical and horizontal segments, as in a step
4313+ # function.
4314+ # - `"step-after"`: alternate between horizontal and vertical segments, as in a step
4315+ # function.
4316+ # - `"basis"`: a B-spline, with control point duplication on the ends.
4317+ # - `"basis-open"`: an open B-spline; may not intersect the start or end.
4318+ # - `"basis-closed"`: a closed B-spline, as in a loop.
4319+ # - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
4320+ # - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
4321+ # will intersect other control points.
4322+ # - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
4323+ # - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
4324+ # spline.
4325+ # - `"monotone"`: cubic interpolation that preserves monotonicity in y.
4326+ property interpolate : String?
4327+
4328+ # The maximum length of the text mark in pixels (default 0, indicating no limit). The text
4329+ # value will be automatically truncated if the rendered size exceeds the limit.
4330+ property limit : Float64?
4331+
4332+ # The overall opacity (value between [0,1]).
4333+ #
4334+ # __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
4335+ # `square` marks or layered `bar` charts and `1` otherwise.
4336+ property opacity : Float64?
4337+
4338+ # The orientation of a non-stacked bar, tick, area, and line charts.
4339+ # The value is either horizontal (default) or vertical.
4340+ # - For bar, rule and tick, this determines whether the size of the bar and tick
4341+ # should be applied to x or y dimension.
4342+ # - For area, this property determines the orient property of the Vega output.
4343+ # - For line, this property determines the sort order of the points in the line
4344+ # if `config.sortLineBy` is not specified.
4345+ # For stacked charts, this is always determined by the orientation of the stack;
4346+ # therefore explicitly specified value will be ignored.
4347+ property orient : String?
4348+
4349+ # Polar coordinate radial offset, in pixels, of the text label from the origin determined
4350+ # by the `x` and `y` properties.
4351+ property radius : Float64?
4352+
4353+ # The default symbol shape to use. One of: `"circle"` (default), `"square"`, `"cross"`,
4354+ # `"diamond"`, `"triangle-up"`, or `"triangle-down"`, or a custom SVG path.
4355+ #
4356+ # __Default value:__ `"circle"`
4357+ property shape : String?
4358+
4359+ # The pixel area each the point/circle/square.
4360+ # For example: in the case of circles, the radius is determined in part by the square root
4361+ # of the size value.
4362+ #
4363+ # __Default value:__ `30`
4364+ property size : Float64?
4365+
4366+ # Default Stroke Color. This has higher precedence than config.color
4367+ #
4368+ # __Default value:__ (None)
4369+ property stroke : String?
4370+
4371+ # An array of alternating stroke, space lengths for creating dashed or dotted lines.
4372+ @[JSON::Field(key: "strokeDash")]
4373+ property stroke_dash : Array(Float64)?
4374+
4375+ # The offset (in pixels) into which to begin drawing with the stroke dash array.
4376+ @[JSON::Field(key: "strokeDashOffset")]
4377+ property stroke_dash_offset : Float64?
4378+
4379+ # The stroke opacity (value between [0,1]).
4380+ #
4381+ # __Default value:__ `1`
4382+ @[JSON::Field(key: "strokeOpacity")]
4383+ property stroke_opacity : Float64?
4384+
4385+ # The stroke width, in pixels.
4386+ @[JSON::Field(key: "strokeWidth")]
4387+ property stroke_width : Float64?
4388+
4389+ # A string or array of strings indicating the name of custom styles to apply to the mark. A
4390+ # style is a named collection of mark property defaults defined within the [style
4391+ # configuration](mark.html#style-config). If style is an array, later styles will override
4392+ # earlier styles. Any [mark properties](encoding.html#mark-prop) explicitly defined within
4393+ # the `encoding` will override a style default.
4394+ #
4395+ # __Default value:__ The mark's name. For example, a bar mark will have style `"bar"` by
4396+ # default.
4397+ # __Note:__ Any specified style will augment the default style. For example, a bar mark
4398+ # with `"style": "foo"` will receive from `config.style.bar` and `config.style.foo` (the
4399+ # specified style `"foo"` has higher precedence).
4400+ property style : Style?
4401+
4402+ # Depending on the interpolation type, sets the tension parameter (for line and area marks).
4403+ property tension : Float64?
4404+
4405+ # Placeholder text if the `text` channel is not specified
4406+ property text : String?
4407+
4408+ # Polar coordinate angle, in radians, of the text label from the origin determined by the
4409+ # `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark
4410+ # `startAngle` and `endAngle` properties: angles are measured in radians, with `0`
4411+ # indicating "north".
4412+ property theta : Float64?
4413+
4414+ # The mark type.
4415+ # One of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`,
4416+ # `"area"`, `"point"`, `"geoshape"`, `"rule"`, and `"text"`.
4417+ @[JSON::Field(key: "type")]
4418+ property mark_def_type : String
4419+end
4420+
4421+# An object defining properties of geographic projection.
4422+#
4423+# Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or
4424+# more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`.
4425+class Projection
4426+ include JSON::Serializable
4427+
4428+ # Sets the projection’s center to the specified center, a two-element array of longitude
4429+ # and latitude in degrees.
4430+ #
4431+ # __Default value:__ `[0, 0]`
4432+ property center : Array(Float64)?
4433+
4434+ # Sets the projection’s clipping circle radius to the specified angle in degrees. If
4435+ # `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather
4436+ # than small-circle clipping.
4437+ @[JSON::Field(key: "clipAngle")]
4438+ property clip_angle : Float64?
4439+
4440+ # Sets the projection’s viewport clip extent to the specified bounds in pixels. The extent
4441+ # bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of
4442+ # the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no
4443+ # viewport clipping is performed.
4444+ @[JSON::Field(key: "clipExtent")]
4445+ property clip_extent : Array(Array(Float64))?
4446+
4447+ property coefficient : Float64?
4448+
4449+ property distance : Float64?
4450+
4451+ property fraction : Float64?
4452+
4453+ property lobes : Float64?
4454+
4455+ property parallel : Float64?
4456+
4457+ # Sets the threshold for the projection’s [adaptive
4458+ # resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This
4459+ # value corresponds to the [Douglas–Peucker
4460+ # distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm).
4461+ # If precision is not specified, returns the projection’s current resampling precision
4462+ # which defaults to `√0.5 ≅ 0.70710…`.
4463+ property precision : Hash(String, PrecisionValue)?
4464+
4465+ property radius : Float64?
4466+
4467+ property ratio : Float64?
4468+
4469+ # Sets the projection’s three-axis rotation to the specified angles, which must be a two-
4470+ # or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation
4471+ # angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)
4472+ #
4473+ # __Default value:__ `[0, 0, 0]`
4474+ property rotate : Array(Float64)?
4475+
4476+ property spacing : Float64?
4477+
4478+ property tilt : Float64?
4479+
4480+ # The cartographic projection to use. This value is case-insensitive, for example
4481+ # `"albers"` and `"Albers"` indicate the same projection type. You can find all valid
4482+ # projection types [in the
4483+ # documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).
4484+ #
4485+ # __Default value:__ `mercator`
4486+ @[JSON::Field(key: "type")]
4487+ property projection_type : String?
4488+end
4489+
4490+# Scale, axis, and legend resolutions for layers.
4491+#
4492+# Defines how scales, axes, and legends from different specs should be combined. Resolve is
4493+# a mapping from `scale`, `axis`, and `legend` to a mapping from channels to resolutions.
4494+#
4495+# Scale, axis, and legend resolutions for facets.
4496+#
4497+# Scale and legend resolutions for repeated charts.
4498+#
4499+# Scale, axis, and legend resolutions for vertically concatenated charts.
4500+#
4501+# Scale, axis, and legend resolutions for horizontally concatenated charts.
4502+class Resolve
4503+ include JSON::Serializable
4504+
4505+ property axis : AxisResolveMap?
4506+
4507+ property legend : LegendResolveMap?
4508+
4509+ property scale : ScaleResolveMap?
4510+end
4511+
4512+class AxisResolveMap
4513+ include JSON::Serializable
4514+
4515+ property x : String?
4516+
4517+ property y : String?
4518+end
4519+
4520+class LegendResolveMap
4521+ include JSON::Serializable
4522+
4523+ property color : String?
4524+
4525+ property opacity : String?
4526+
4527+ property shape : String?
4528+
4529+ property size : String?
4530+end
4531+
4532+class ScaleResolveMap
4533+ include JSON::Serializable
4534+
4535+ property color : String?
4536+
4537+ property opacity : String?
4538+
4539+ property shape : String?
4540+
4541+ property size : String?
4542+
4543+ property x : String?
4544+
4545+ property y : String?
4546+end
4547+
4548+class SelectionDef
4549+ include JSON::Serializable
4550+
4551+ # Establish a two-way binding between a single selection and input elements
4552+ # (also known as dynamic query widgets). A binding takes the form of
4553+ # Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)
4554+ # or can be a mapping between projected field/encodings and binding definitions.
4555+ #
4556+ # See the [bind transform](bind.html) documentation for more information.
4557+ #
4558+ # Establishes a two-way binding between the interval selection and the scales
4559+ # used within the same view. This allows a user to interactively pan and
4560+ # zoom the view.
4561+ property bind : BindUnion?
4562+
4563+ # By default, all data values are considered to lie within an empty selection.
4564+ # When set to `none`, empty selections contain no data values.
4565+ property empty : String?
4566+
4567+ # An array of encoding channels. The corresponding data field values
4568+ # must match for a data tuple to fall within the selection.
4569+ property encodings : Array(String)?
4570+
4571+ # An array of field names whose values must match for a data tuple to
4572+ # fall within the selection.
4573+ property fields : Array(String)?
4574+
4575+ # When true, an invisible voronoi diagram is computed to accelerate discrete
4576+ # selection. The data value _nearest_ the mouse cursor is added to the selection.
4577+ #
4578+ # See the [nearest transform](nearest.html) documentation for more information.
4579+ property nearest : Bool?
4580+
4581+ # A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or
4582+ # selector) that triggers the selection.
4583+ # For interval selections, the event stream must specify a [start and
4584+ # end](https://vega.github.io/vega/docs/event-streams/#between-filters).
4585+ property on : JSON::Any?
4586+
4587+ # With layered and multi-view displays, a strategy that determines how
4588+ # selections' data queries are resolved when applied in a filter transform,
4589+ # conditional encoding rule, or scale domain.
4590+ property resolve : String?
4591+
4592+ @[JSON::Field(key: "type")]
4593+ property selection_def_type : String
4594+
4595+ # Controls whether data values should be toggled or only ever inserted into
4596+ # multi selections. Can be `true`, `false` (for insertion only), or a
4597+ # [Vega expression](https://vega.github.io/vega/docs/expressions/).
4598+ #
4599+ # __Default value:__ `true`, which corresponds to `event.shiftKey` (i.e.,
4600+ # data values are toggled when a user interacts with the shift-key pressed).
4601+ #
4602+ # See the [toggle transform](toggle.html) documentation for more information.
4603+ property toggle : Translate?
4604+
4605+ # An interval selection also adds a rectangle mark to depict the
4606+ # extents of the interval. The `mark` property can be used to customize the
4607+ # appearance of the mark.
4608+ property mark : BrushConfig?
4609+
4610+ # When truthy, allows a user to interactively move an interval selection
4611+ # back-and-forth. Can be `true`, `false` (to disable panning), or a
4612+ # [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/)
4613+ # which must include a start and end event to trigger continuous panning.
4614+ #
4615+ # __Default value:__ `true`, which corresponds to
4616+ # `[mousedown, window:mouseup] > window:mousemove!` which corresponds to
4617+ # clicks and dragging within an interval selection to reposition it.
4618+ property translate : Translate?
4619+
4620+ # When truthy, allows a user to interactively resize an interval selection.
4621+ # Can be `true`, `false` (to disable zooming), or a [Vega event stream
4622+ # definition](https://vega.github.io/vega/docs/event-streams/). Currently,
4623+ # only `wheel` events are supported.
4624+ #
4625+ #
4626+ # __Default value:__ `true`, which corresponds to `wheel!`.
4627+ property zoom : Translate?
4628+end
4629+
4630+class TitleParams
4631+ include JSON::Serializable
4632+
4633+ # The anchor position for placing the title. One of `"start"`, `"middle"`, or `"end"`. For
4634+ # example, with an orientation of top these anchor positions map to a left-, center-, or
4635+ # right-aligned title.
4636+ #
4637+ # __Default value:__ `"middle"` for [single](spec.html) and [layered](layer.html) views.
4638+ # `"start"` for other composite views.
4639+ #
4640+ # __Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only
4641+ # customizable only for [single](spec.html) and [layered](layer.html) views. For other
4642+ # composite views, `anchor` is always `"start"`.
4643+ property anchor : String?
4644+
4645+ # The orthogonal offset in pixels by which to displace the title from its position along
4646+ # the edge of the chart.
4647+ property offset : Float64?
4648+
4649+ # The orientation of the title relative to the chart. One of `"top"` (the default),
4650+ # `"bottom"`, `"left"`, or `"right"`.
4651+ property orient : String?
4652+
4653+ # A [mark style property](config.html#style) to apply to the title text mark.
4654+ #
4655+ # __Default value:__ `"group-title"`.
4656+ property style : Style?
4657+
4658+ # The title text.
4659+ property text : String
4660+end
4661+
4662+class Transform
4663+ include JSON::Serializable
4664+
4665+ # The `filter` property must be one of the predicate definitions:
4666+ # (1) an [expression](types.html#expression) string,
4667+ # where `datum` can be used to refer to the current data object;
4668+ # (2) one of the field predicates: [equal predicate](filter.html#equal-predicate);
4669+ # [range predicate](filter.html#range-predicate), [one-of
4670+ # predicate](filter.html#one-of-predicate);
4671+ # (3) a [selection predicate](filter.html#selection-predicate);
4672+ # or (4) a logical operand that combines (1), (2), or (3).
4673+ property filter : ConditionalValueDefLogicalOperandPredicate?
4674+
4675+ # The field for storing the computed formula value.
4676+ #
4677+ # The field or fields for storing the computed formula value.
4678+ # If `from.fields` is specified, the transform will use the same names for `as`.
4679+ # If `from.fields` is not specified, `as` has to be a string and we put the whole object
4680+ # into the data under the specified name.
4681+ #
4682+ # The output fields at which to write the start and end bin values.
4683+ #
4684+ # The output field to write the timeUnit value.
4685+ @[JSON::Field(key: "as")]
4686+ property transform_as : Style?
4687+
4688+ # A [expression](types.html#expression) string. Use the variable `datum` to refer to the
4689+ # current data object.
4690+ property calculate : String?
4691+
4692+ # The default value to use if lookup fails.
4693+ #
4694+ # __Default value:__ `null`
4695+ property default : String?
4696+
4697+ # Secondary data reference.
4698+ property from : LookupData?
4699+
4700+ # Key in primary data source.
4701+ property lookup : String?
4702+
4703+ # An object indicating bin properties, or simply `true` for using default bin parameters.
4704+ property bin : Bin?
4705+
4706+ # The data field to bin.
4707+ #
4708+ # The data field to apply time unit.
4709+ property field : String?
4710+
4711+ # The timeUnit.
4712+ @[JSON::Field(key: "timeUnit")]
4713+ property time_unit : String?
4714+
4715+ # Array of objects that define fields to aggregate.
4716+ property aggregate : Array(AggregatedFieldDef)?
4717+
4718+ # The data fields to group by. If not specified, a single group containing all data objects
4719+ # will be used.
4720+ property groupby : Array(String)?
4721+end
4722+
4723+class AggregatedFieldDef
4724+ include JSON::Serializable
4725+
4726+ # The output field names to use for each aggregated field.
4727+ @[JSON::Field(key: "as")]
4728+ property aggregated_field_def_as : String
4729+
4730+ # The data field for which to compute aggregate function.
4731+ property field : String
4732+
4733+ # The aggregation operations to apply to the fields, such as sum, average or count.
4734+ # See the [full list of supported aggregation
4735+ # operations](https://vega.github.io/vega-lite/docs/aggregate.html#ops)
4736+ # for more information.
4737+ property op : String
4738+end
4739+
4740+# Secondary data reference.
4741+class LookupData
4742+ include JSON::Serializable
4743+
4744+ # Secondary data source to lookup in.
4745+ property data : Data
4746+
4747+ # Fields in foreign data to lookup.
4748+ # If not specified, the entire object is queried.
4749+ property fields : Array(String)?
4750+
4751+ # Key in data to lookup.
4752+ property key : String
4753+end
4754+
4755+# An object that describes what fields should be repeated into views that are laid out as a
4756+# `row` or `column`.
4757+class Repeat
4758+ include JSON::Serializable
4759+
4760+ # Horizontal repeated views.
4761+ property column : Array(String)?
4762+
4763+ # Vertical repeated views.
4764+ property row : Array(String)?
4765+end
4766+
4767+# Sets how the visualization size should be determined. If a string, should be one of
4768+# `"pad"`, `"fit"` or `"none"`.
4769+# Object values can additionally specify parameters for content sizing and automatic
4770+# resizing.
4771+# `"fit"` is only supported for single and layered views that don't use `rangeStep`.
4772+#
4773+# __Default value__: `pad`
4774+alias Autosize = AutoSizeParams | String
4775+
4776+# The font weight (e.g., `"bold"`).
4777+#
4778+# Font weight for title text.
4779+alias FontWeightUnion = Float64 | String
4780+
4781+# Indicates if labels should be hidden if they exceed the axis range. If `false `(the
4782+# default) no bounds overlap analysis is performed. If `true`, labels will be hidden if
4783+# they exceed the axis range by more than 1 pixel. If this property is a number, it
4784+# specifies the pixel tolerance: the maximum amount by which a label bounding box may
4785+# exceed the axis range.
4786+#
4787+# __Default value:__ `false`.
4788+#
4789+# Indicates if the first and last axis labels should be aligned flush with the scale range.
4790+# Flush alignment for a horizontal axis will left-align the first label and right-align the
4791+# last label. For vertical axes, bottom and top text baselines are applied instead. If this
4792+# property is a number, it also indicates the number of pixels by which to offset the first
4793+# and last labels; for example, a value of 2 will flush-align the first and last labels and
4794+# also push them 2 pixels outward from the center of the axis. The additional adjustment
4795+# can sometimes help the labels better visually group with corresponding axis ticks.
4796+#
4797+# __Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.
4798+alias Label = Float64 | Bool
4799+
4800+alias LabelOverlapUnion = Bool | String
4801+
4802+# Font weight of the title. (e.g., `"bold"`).
4803+#
4804+# The font weight of the legend title.
4805+alias TitleFontWeightUnion = Float64 | String
4806+
4807+# The default visualization padding, in pixels, from the edge of the visualization canvas
4808+# to the data rectangle. If a number, specifies padding for all sides.
4809+# If an object, the value should have the format `{"left": 5, "top": 5, "right": 5,
4810+# "bottom": 5}` to specify padding for each side of the visualization.
4811+#
4812+# __Default value__: `5`
4813+alias Padding = Float64 | PaddingClass
4814+
4815+# Font weight of the title. (e.g., `"bold"`).
4816+#
4817+# The font weight of the legend title.
4818+alias PrecisionValue = Float64 | String
4819+
4820+alias RangeConfigValue = Array(PrecisionValue) | VgScheme
4821+
4822+# When truthy, allows a user to interactively move an interval selection
4823+# back-and-forth. Can be `true`, `false` (to disable panning), or a
4824+# [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/)
4825+# which must include a start and end event to trigger continuous panning.
4826+#
4827+# __Default value:__ `true`, which corresponds to
4828+# `[mousedown, window:mouseup] > window:mousemove!` which corresponds to
4829+# clicks and dragging within an interval selection to reposition it.
4830+#
4831+# When truthy, allows a user to interactively resize an interval selection.
4832+# Can be `true`, `false` (to disable zooming), or a [Vega event stream
4833+# definition](https://vega.github.io/vega/docs/event-streams/). Currently,
4834+# only `wheel` events are supported.
4835+#
4836+#
4837+# __Default value:__ `true`, which corresponds to `wheel!`.
4838+#
4839+# Controls whether data values should be toggled or only ever inserted into
4840+# multi selections. Can be `true`, `false` (for insertion only), or a
4841+# [Vega expression](https://vega.github.io/vega/docs/expressions/).
4842+#
4843+# __Default value:__ `true`, which corresponds to `event.shiftKey` (i.e.,
4844+# data values are toggled when a user interacts with the shift-key pressed).
4845+#
4846+# See the [toggle transform](toggle.html) documentation for more information.
4847+alias Translate = Bool | String
4848+
4849+alias ParseUnion = Hash(String, JSON::Any?) | String
4850+
4851+# The full data set, included inline. This can be an array of objects or primitive values
4852+# or a string.
4853+# Arrays of primitive values are ingested as objects with a `data` property. Strings are
4854+# parsed according to the specified format type.
4855+alias Values = Hash(String, JSON::Any?) | String | Array(ValuesValue)
4856+
4857+alias ValuesValue = Hash(String, JSON::Any?) | Float64 | Bool | String
4858+
4859+alias Bin = BinParams | Bool
4860+
4861+alias ColorCondition = ConditionalPredicateMarkPropFieldDefClass | Array(ConditionalValueDef)
4862+
4863+# Filter using a selection name.
4864+#
4865+# A [selection name](selection.html), or a series of [composed
4866+# selections](selection.html#compose).
4867+alias SelectionOperandElement = String | Selection
4868+
4869+# Filter using a selection name.
4870+#
4871+# A [selection name](selection.html), or a series of [composed
4872+# selections](selection.html#compose).
4873+alias ConditionalValueDefSelectionOperand = String | Selection
4874+
4875+# The `filter` property must be one of the predicate definitions:
4876+# (1) an [expression](types.html#expression) string,
4877+# where `datum` can be used to refer to the current data object;
4878+# (2) one of the field predicates: [equal predicate](filter.html#equal-predicate);
4879+# [range predicate](filter.html#range-predicate), [one-of
4880+# predicate](filter.html#one-of-predicate);
4881+# (3) a [selection predicate](filter.html#selection-predicate);
4882+# or (4) a logical operand that combines (1), (2), or (3).
4883+alias LogicalOperandPredicateElement = Predicate | String
4884+
4885+# The `filter` property must be one of the predicate definitions:
4886+# (1) an [expression](types.html#expression) string,
4887+# where `datum` can be used to refer to the current data object;
4888+# (2) one of the field predicates: [equal predicate](filter.html#equal-predicate);
4889+# [range predicate](filter.html#range-predicate), [one-of
4890+# predicate](filter.html#one-of-predicate);
4891+# (3) a [selection predicate](filter.html#selection-predicate);
4892+# or (4) a logical operand that combines (1), (2), or (3).
4893+alias ConditionalValueDefLogicalOperandPredicate = Predicate | String
4894+
4895+# The value that the field should be equal to.
4896+alias EqualUnion = DateTime | Float64 | Bool | String
4897+
4898+# Value representing the day of a week. This can be one of: (1) integer value -- `1`
4899+# represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
4900+# case-insensitive, 3-character short day name (e.g., `"Mon"`). <br/> **Warning:** A
4901+# DateTime definition object with `day`** should not be combined with `year`, `quarter`,
4902+# `month`, or `date`.
4903+alias Day = Float64 | String
4904+
4905+# One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
4906+# (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
4907+# short month name (e.g., `"Jan"`).
4908+alias Month = Float64 | String
4909+
4910+# The value that the field should be equal to.
4911+alias OneOfElement = DateTime | Float64 | Bool | String
4912+
4913+alias RangeElement = DateTime | Float64
4914+
4915+# A constant value in visual domain (e.g., `"red"` / "#0099ff" for color, values between
4916+# `0` to `1` for opacity).
4917+#
4918+# A constant value in visual domain.
4919+alias ConditionalValueDefValue = Float64 | Bool | String
4920+
4921+alias Field = String | RepeatRef
4922+
4923+alias LegendValue = DateTime | Float64 | String
4924+
4925+# Customized domain values.
4926+#
4927+# For _quantitative_ fields, `domain` can take the form of a two-element array with minimum
4928+# and maximum values. [Piecewise scales](scale.html#piecewise) can be created by providing
4929+# a `domain` with more than two entries.
4930+# If the input field is aggregated, `domain` can also be a string value `"unaggregated"`,
4931+# indicating that the domain should include the raw data values prior to the aggregation.
4932+#
4933+# For _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in
4934+# the form of either timestamps or the [DateTime definition objects](types.html#datetime).
4935+#
4936+# For _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input
4937+# values.
4938+#
4939+# The `selection` property can be used to [interactively
4940+# determine](selection.html#scale-domains) the scale domain.
4941+alias DomainUnion = DomainClass | String | Array(OneOfElement)
4942+
4943+# The interpolation method for range values. By default, a general interpolator for
4944+# numbers, dates, strings and colors (in RGB space) is used. For color ranges, this
4945+# property allows interpolation in alternative color spaces. Legal values include `rgb`,
4946+# `hsl`, `hsl-long`, `lab`, `hcl`, `hcl-long`, `cubehelix` and `cubehelix-long` ('-long'
4947+# variants use longer paths in polar coordinate spaces). If object-valued, this property
4948+# accepts an object with a string-valued _type_ property and an optional numeric _gamma_
4949+# property applicable to rgb and cubehelix interpolators. For more, see the [d3-interpolate
4950+# documentation](https://github.com/d3/d3-interpolate).
4951+#
4952+# __Note:__ Sequential scales do not support `interpolate` as they have a fixed
4953+# interpolator. Since Vega-Lite uses sequential scales for quantitative fields by default,
4954+# you have to set the scale `type` to other quantitative scale type such as `"linear"` to
4955+# customize `interpolate`.
4956+alias InterpolateUnion = InterpolateParams | String
4957+
4958+# Extending the domain so that it starts and ends on nice round values. This method
4959+# typically modifies the scale’s domain, and may only extend the bounds to the nearest
4960+# round value. Nicing is useful if the domain is computed from data and may be irregular.
4961+# For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2,
4962+# 1.0]_.
4963+#
4964+# For quantitative scales such as linear, `nice` can be either a boolean flag or a number.
4965+# If `nice` is a number, it will represent a desired tick count. This allows greater
4966+# control over the step size used to extend the bounds, guaranteeing that the returned
4967+# ticks will exactly cover the domain.
4968+#
4969+# For temporal fields with time and utc scales, the `nice` value can be a string indicating
4970+# the desired time interval. Legal values are `"millisecond"`, `"second"`, `"minute"`,
4971+# `"hour"`, `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, `time` and `utc`
4972+# scales can accept an object-valued interval specifier of the form `{"interval": "month",
4973+# "step": 3}`, which includes a desired number of interval steps. Here, the domain would
4974+# snap to quarter (Jan, Apr, Jul, Oct) boundaries.
4975+#
4976+# __Default value:__ `true` for unbinned _quantitative_ fields; `false` otherwise.
4977+alias NiceUnion = Float64 | NiceClass | Bool | String
4978+
4979+# The range of the scale. One of:
4980+#
4981+# - A string indicating a [pre-defined named scale range](scale.html#range-config) (e.g.,
4982+# example, `"symbol"`, or `"diverging"`).
4983+#
4984+# - For [continuous scales](scale.html#continuous), two-element array indicating minimum
4985+# and maximum values, or an array with more than two entries for specifying a [piecewise
4986+# scale](scale.html#piecewise).
4987+#
4988+# - For [discrete](scale.html#discrete) and [discretizing](scale.html#discretizing) scales,
4989+# an array of desired output values.
4990+#
4991+# __Notes:__
4992+#
4993+# 1) For [sequential](scale.html#sequential), [ordinal](scale.html#ordinal), and
4994+# discretizing color scales, you can also specify a color [`scheme`](scale.html#scheme)
4995+# instead of `range`.
4996+#
4997+# 2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be
4998+# customized via the view's corresponding [size](size.html) (`width` and `height`) or via
4999+# [range steps and paddings properties](#range-step) for [band](#band) and [point](#point)
5000+# scales.
5001+alias ScaleRange = String | Array(PrecisionValue)
5002+
5003+# A string indicating a color [scheme](scale.html#scheme) name (e.g., `"category10"` or
5004+# `"viridis"`) or a [scheme parameter object](scale.html#scheme-params).
5005+#
5006+# Discrete color schemes may be used with [discrete](scale.html#discrete) or
5007+# [discretizing](scale.html#discretizing) scales. Continuous color schemes are intended for
5008+# use with [sequential](scales.html#sequential) scales.
5009+#
5010+# For the full list of supported scheme, please refer to the [Vega
5011+# Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.
5012+alias Scheme = String | SchemeParams
5013+
5014+alias SortUnion = String | SortField
5015+
5016+# A constant value in visual domain (e.g., `"red"` / "#0099ff" for color, values between
5017+# `0` to `1` for opacity).
5018+#
5019+# A constant value in visual domain.
5020+alias ConditionalPredicateValueDefValue = Float64 | Bool | String
5021+
5022+alias Detail = FieldDef | Array(FieldDef)
5023+
5024+alias HrefCondition = ConditionalPredicateFieldDefClass | Array(ConditionalValueDef)
5025+
5026+alias Order = OrderFieldDef | Array(OrderFieldDef)
5027+
5028+alias TextCondition = ConditionalPredicateTextFieldDefClass | Array(ConditionalValueDef)
5029+
5030+alias AxisValue = DateTime | Float64
5031+
5032+# A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
5033+# `"line"`,
5034+# * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition
5035+# object](mark.html#mark-def).
5036+alias AnyMark = MarkDef | String
5037+
5038+# A string or array of strings indicating the name of custom styles to apply to the mark. A
5039+# style is a named collection of mark property defaults defined within the [style
5040+# configuration](mark.html#style-config). If style is an array, later styles will override
5041+# earlier styles. Any [mark properties](encoding.html#mark-prop) explicitly defined within
5042+# the `encoding` will override a style default.
5043+#
5044+# __Default value:__ The mark's name. For example, a bar mark will have style `"bar"` by
5045+# default.
5046+# __Note:__ Any specified style will augment the default style. For example, a bar mark
5047+# with `"style": "foo"` will receive from `config.style.bar` and `config.style.foo` (the
5048+# specified style `"foo"` has higher precedence).
5049+#
5050+# A [mark style property](config.html#style) to apply to the title text mark.
5051+#
5052+# __Default value:__ `"group-title"`.
5053+alias Style = String | Array(String)
5054+
5055+alias BindUnion = String | Hash(String, VgBinding)
5056+
5057+alias Title = String | TitleParams
No generated files match these filters.