@@ -6,11 +6,18 @@ use std::collections::BTreeMap as Map;
66use crate :: empty;
77use crate :: prim_str:: PrimStr ;
88
9- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
109#[ cfg_attr(
11- feature = "serde" ,
10+ any( feature = "serde" , feature = "lib-simd-json" ) ,
11+ derive( Serialize , Deserialize )
12+ ) ]
13+ #[ cfg_attr(
14+ any( feature = "serde" , feature = "lib-simd-json" ) ,
1215 serde( deny_unknown_fields, rename_all = "camelCase" )
1316) ]
17+ #[ cfg_attr(
18+ feature = "lib-simd-json" ,
19+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
20+ ) ]
1421pub struct CitmCatalog {
1522 pub area_names : Map < IdStr , String > ,
1623 pub audience_sub_category_names : Map < IdStr , String > ,
@@ -28,11 +35,18 @@ pub struct CitmCatalog {
2835pub type Id = u32 ;
2936pub type IdStr = PrimStr < u32 > ;
3037
31- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
3238#[ cfg_attr(
33- feature = "serde" ,
39+ any( feature = "serde" , feature = "lib-simd-json" ) ,
40+ derive( Serialize , Deserialize )
41+ ) ]
42+ #[ cfg_attr(
43+ any( feature = "serde" , feature = "lib-simd-json" ) ,
3444 serde( deny_unknown_fields, rename_all = "camelCase" )
3545) ]
46+ #[ cfg_attr(
47+ feature = "lib-simd-json" ,
48+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
49+ ) ]
3650pub struct Event {
3751 pub description : ( ) ,
3852 pub id : Id ,
@@ -44,11 +58,18 @@ pub struct Event {
4458 pub topic_ids : Vec < Id > ,
4559}
4660
47- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
4861#[ cfg_attr(
49- feature = "serde" ,
62+ any( feature = "serde" , feature = "lib-simd-json" ) ,
63+ derive( Serialize , Deserialize )
64+ ) ]
65+ #[ cfg_attr(
66+ any( feature = "serde" , feature = "lib-simd-json" ) ,
5067 serde( deny_unknown_fields, rename_all = "camelCase" )
5168) ]
69+ #[ cfg_attr(
70+ feature = "lib-simd-json" ,
71+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
72+ ) ]
5273pub struct Performance {
5374 pub event_id : Id ,
5475 pub id : Id ,
@@ -61,32 +82,53 @@ pub struct Performance {
6182 pub venue_code : String ,
6283}
6384
64- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
6585#[ cfg_attr(
66- feature = "serde" ,
86+ any( feature = "serde" , feature = "lib-simd-json" ) ,
87+ derive( Serialize , Deserialize )
88+ ) ]
89+ #[ cfg_attr(
90+ any( feature = "serde" , feature = "lib-simd-json" ) ,
6791 serde( deny_unknown_fields, rename_all = "camelCase" )
6892) ]
93+ #[ cfg_attr(
94+ feature = "lib-simd-json" ,
95+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
96+ ) ]
6997pub struct Price {
7098 pub amount : u32 ,
7199 pub audience_sub_category_id : Id ,
72100 pub seat_category_id : Id ,
73101}
74102
75- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
76103#[ cfg_attr(
77- feature = "serde" ,
104+ any( feature = "serde" , feature = "lib-simd-json" ) ,
105+ derive( Serialize , Deserialize )
106+ ) ]
107+ #[ cfg_attr(
108+ any( feature = "serde" , feature = "lib-simd-json" ) ,
78109 serde( deny_unknown_fields, rename_all = "camelCase" )
79110) ]
111+ #[ cfg_attr(
112+ feature = "lib-simd-json" ,
113+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
114+ ) ]
80115pub struct SeatCategory {
81116 pub areas : Vec < Area > ,
82117 pub seat_category_id : Id ,
83118}
84119
85- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
86120#[ cfg_attr(
87- feature = "serde" ,
121+ any( feature = "serde" , feature = "lib-simd-json" ) ,
122+ derive( Serialize , Deserialize )
123+ ) ]
124+ #[ cfg_attr(
125+ any( feature = "serde" , feature = "lib-simd-json" ) ,
88126 serde( deny_unknown_fields, rename_all = "camelCase" )
89127) ]
128+ #[ cfg_attr(
129+ feature = "lib-simd-json" ,
130+ derive( simd_json_derive:: Serialize , simd_json_derive:: Deserialize )
131+ ) ]
90132pub struct Area {
91133 pub area_id : Id ,
92134 pub block_ids : empty:: Array ,
0 commit comments