Skip to main content

engage/generated/moon_sharp/interpreter/serialization/json/
jsontableconverter.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "moon_sharp-interpreter-serialization-json-jsontableconverter-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/moon_sharp/interpreter/serialization/json/jsontableconverter/JsonTableConverter.md"))]
11    #[::unity::class(namespace = "MoonSharp.Interpreter.Serialization.Json", name = "JsonTableConverter")]
12    #[parent(crate::system::object::Object)]
13    pub struct JsonTableConverter {}
14}
15
16#[cfg(feature = "moon_sharp-interpreter-serialization-json-jsontableconverter-types")]
17pub use __types::*;
18
19#[cfg(feature = "moon_sharp-interpreter-serialization-json-jsontableconverter")]
20#[doc(hidden)]
21#[allow(non_snake_case, non_camel_case_types, clippy::too_many_arguments)]
22mod __JsonTableConverter_unity_raw {
23    use super::*;
24    #[doc(hidden)]
25    #[allow(non_snake_case)]
26    pub mod __lookup_table_to_json {
27        use super::*;
28        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
29            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
30                &[<crate::moon_sharp::interpreter::table::Table as ::unity::IlType>::il_type()];
31            ::unity::lookup::method_info_on_class_with_signature(
32                <JsonTableConverter as ::unity::ClassIdentity>::class(),
33                "TableToJson",
34                1,
35                param_types,
36                true,
37            )
38        });
39        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
40            match &*METHOD {
41                ::core::result::Result::Ok(mi) => *mi,
42                ::core::result::Result::Err(e) => {
43                    panic!(
44                        "method lookup failed: {}
45::{}
46: {}
47",
48                        <JsonTableConverter as ::unity::ClassIdentity>::NAME,
49                        "TableToJson",
50                        e
51                    )
52                },
53            }
54        }
55    }
56    #[doc(hidden)]
57    #[allow(non_snake_case)]
58    pub mod __lookup_object_to_json {
59        use super::*;
60        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
61            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<crate::system::object::Object as ::unity::IlType>::il_type()];
62            ::unity::lookup::method_info_on_class_with_signature(
63                <JsonTableConverter as ::unity::ClassIdentity>::class(),
64                "ObjectToJson",
65                1,
66                param_types,
67                true,
68            )
69        });
70        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
71            match &*METHOD {
72                ::core::result::Result::Ok(mi) => *mi,
73                ::core::result::Result::Err(e) => {
74                    panic!(
75                        "method lookup failed: {}
76::{}
77: {}
78",
79                        <JsonTableConverter as ::unity::ClassIdentity>::NAME,
80                        "ObjectToJson",
81                        e
82                    )
83                },
84            }
85        }
86    }
87    #[doc(hidden)]
88    #[allow(non_snake_case)]
89    pub mod __lookup_escape_string {
90        use super::*;
91        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
92            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[<::unity::Il2CppString as ::unity::IlType>::il_type()];
93            ::unity::lookup::method_info_on_class_with_signature(
94                <JsonTableConverter as ::unity::ClassIdentity>::class(),
95                "EscapeString",
96                1,
97                param_types,
98                true,
99            )
100        });
101        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
102            match &*METHOD {
103                ::core::result::Result::Ok(mi) => *mi,
104                ::core::result::Result::Err(e) => {
105                    panic!(
106                        "method lookup failed: {}
107::{}
108: {}
109",
110                        <JsonTableConverter as ::unity::ClassIdentity>::NAME,
111                        "EscapeString",
112                        e
113                    )
114                },
115            }
116        }
117    }
118    #[doc(hidden)]
119    #[allow(non_snake_case)]
120    pub mod __lookup_is_value_json_compatible {
121        use super::*;
122        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
123            let param_types: &[&'static ::unity::il2cpp::Il2CppType] =
124                &[<crate::moon_sharp::interpreter::dynvalue::DynValue as ::unity::IlType>::il_type()];
125            ::unity::lookup::method_info_on_class_with_signature(
126                <JsonTableConverter as ::unity::ClassIdentity>::class(),
127                "IsValueJsonCompatible",
128                1,
129                param_types,
130                true,
131            )
132        });
133        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
134            match &*METHOD {
135                ::core::result::Result::Ok(mi) => *mi,
136                ::core::result::Result::Err(e) => {
137                    panic!(
138                        "method lookup failed: {}
139::{}
140: {}
141",
142                        <JsonTableConverter as ::unity::ClassIdentity>::NAME,
143                        "IsValueJsonCompatible",
144                        e
145                    )
146                },
147            }
148        }
149    }
150    #[doc(hidden)]
151    #[allow(non_snake_case)]
152    pub mod __lookup_json_to_table {
153        use super::*;
154        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
155            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
156                <::unity::Il2CppString as ::unity::IlType>::il_type(),
157                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
158            ];
159            ::unity::lookup::method_info_on_class_with_signature(
160                <JsonTableConverter as ::unity::ClassIdentity>::class(),
161                "JsonToTable",
162                2,
163                param_types,
164                true,
165            )
166        });
167        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
168            match &*METHOD {
169                ::core::result::Result::Ok(mi) => *mi,
170                ::core::result::Result::Err(e) => {
171                    panic!(
172                        "method lookup failed: {}
173::{}
174: {}
175",
176                        <JsonTableConverter as ::unity::ClassIdentity>::NAME,
177                        "JsonToTable",
178                        e
179                    )
180                },
181            }
182        }
183    }
184    #[doc(hidden)]
185    #[allow(non_snake_case)]
186    pub mod __lookup_assert_token {
187        use super::*;
188        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
189            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
190                <crate::moon_sharp::interpreter::tree::lexer::Lexer as ::unity::IlType>::il_type(),
191                <crate::moon_sharp::interpreter::tree::tokentype::TokenType as ::unity::IlType>::il_type(),
192            ];
193            ::unity::lookup::method_info_on_class_with_signature(
194                <JsonTableConverter as ::unity::ClassIdentity>::class(),
195                "AssertToken",
196                2,
197                param_types,
198                true,
199            )
200        });
201        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202            match &*METHOD {
203                ::core::result::Result::Ok(mi) => *mi,
204                ::core::result::Result::Err(e) => {
205                    panic!(
206                        "method lookup failed: {}
207::{}
208: {}
209",
210                        <JsonTableConverter as ::unity::ClassIdentity>::NAME,
211                        "AssertToken",
212                        e
213                    )
214                },
215            }
216        }
217    }
218    #[doc(hidden)]
219    #[allow(non_snake_case)]
220    pub mod __lookup_parse_json_array {
221        use super::*;
222        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
223            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
224                <crate::moon_sharp::interpreter::tree::lexer::Lexer as ::unity::IlType>::il_type(),
225                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
226            ];
227            ::unity::lookup::method_info_on_class_with_signature(
228                <JsonTableConverter as ::unity::ClassIdentity>::class(),
229                "ParseJsonArray",
230                2,
231                param_types,
232                true,
233            )
234        });
235        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
236            match &*METHOD {
237                ::core::result::Result::Ok(mi) => *mi,
238                ::core::result::Result::Err(e) => {
239                    panic!(
240                        "method lookup failed: {}
241::{}
242: {}
243",
244                        <JsonTableConverter as ::unity::ClassIdentity>::NAME,
245                        "ParseJsonArray",
246                        e
247                    )
248                },
249            }
250        }
251    }
252    #[doc(hidden)]
253    #[allow(non_snake_case)]
254    pub mod __lookup_parse_json_object {
255        use super::*;
256        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
257            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
258                <crate::moon_sharp::interpreter::tree::lexer::Lexer as ::unity::IlType>::il_type(),
259                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
260            ];
261            ::unity::lookup::method_info_on_class_with_signature(
262                <JsonTableConverter as ::unity::ClassIdentity>::class(),
263                "ParseJsonObject",
264                2,
265                param_types,
266                true,
267            )
268        });
269        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
270            match &*METHOD {
271                ::core::result::Result::Ok(mi) => *mi,
272                ::core::result::Result::Err(e) => {
273                    panic!(
274                        "method lookup failed: {}
275::{}
276: {}
277",
278                        <JsonTableConverter as ::unity::ClassIdentity>::NAME,
279                        "ParseJsonObject",
280                        e
281                    )
282                },
283            }
284        }
285    }
286    #[doc(hidden)]
287    #[allow(non_snake_case)]
288    pub mod __lookup_parse_json_value {
289        use super::*;
290        static METHOD: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
291            let param_types: &[&'static ::unity::il2cpp::Il2CppType] = &[
292                <crate::moon_sharp::interpreter::tree::lexer::Lexer as ::unity::IlType>::il_type(),
293                <crate::moon_sharp::interpreter::script::Script as ::unity::IlType>::il_type(),
294            ];
295            ::unity::lookup::method_info_on_class_with_signature(
296                <JsonTableConverter as ::unity::ClassIdentity>::class(),
297                "ParseJsonValue",
298                2,
299                param_types,
300                true,
301            )
302        });
303        pub fn get_method_info() -> &'static ::unity::il2cpp::MethodInfo {
304            match &*METHOD {
305                ::core::result::Result::Ok(mi) => *mi,
306                ::core::result::Result::Err(e) => {
307                    panic!(
308                        "method lookup failed: {}
309::{}
310: {}
311",
312                        <JsonTableConverter as ::unity::ClassIdentity>::NAME,
313                        "ParseJsonValue",
314                        e
315                    )
316                },
317            }
318        }
319    }
320}
321
322#[cfg(feature = "moon_sharp-interpreter-serialization-json-jsontableconverter")]
323impl JsonTableConverter {
324    #[doc = "`TableToJson(crate::moon_sharp::interpreter::table::Table)` overload"]
325    pub fn table_to_json(table: impl ::core::convert::Into<crate::moon_sharp::interpreter::table::Table>) -> ::unity::Il2CppString {
326        unsafe {
327            ::unity::il2cpp_call!(__JsonTableConverter_unity_raw::__lookup_table_to_json::get_method_info().method_ptr, ::unity::Il2CppString;
328(crate::moon_sharp::interpreter::table::Table)::core::convert::Into::into(table))
329        }
330    }
331
332    #[doc = "`ObjectToJson(crate::system::object::Object)` overload"]
333    pub fn object_to_json(obj: impl ::core::convert::Into<crate::system::object::Object>) -> ::unity::Il2CppString {
334        unsafe {
335            ::unity::il2cpp_call!(__JsonTableConverter_unity_raw::__lookup_object_to_json::get_method_info().method_ptr, ::unity::Il2CppString;
336(crate::system::object::Object)::core::convert::Into::into(obj))
337        }
338    }
339
340    #[doc = "`EscapeString(::unity::Il2CppString)` overload"]
341    pub fn escape_string(s: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
342        unsafe {
343            ::unity::il2cpp_call!(__JsonTableConverter_unity_raw::__lookup_escape_string::get_method_info().method_ptr, ::unity::Il2CppString;
344(::unity::Il2CppString)::core::convert::Into::into(s))
345        }
346    }
347
348    #[doc = "`IsValueJsonCompatible(crate::moon_sharp::interpreter::dynvalue::DynValue)` overload"]
349    pub fn is_value_json_compatible(value: impl ::core::convert::Into<crate::moon_sharp::interpreter::dynvalue::DynValue>) -> bool {
350        unsafe {
351            ::unity::il2cpp_call!(__JsonTableConverter_unity_raw::__lookup_is_value_json_compatible::get_method_info().method_ptr,bool;
352(crate::moon_sharp::interpreter::dynvalue::DynValue)::core::convert::Into::into(value))
353        }
354    }
355
356    #[doc = "`JsonToTable(::unity::Il2CppString, crate::moon_sharp::interpreter::script::Script)` overload"]
357    pub fn json_to_table(
358        json: impl ::core::convert::Into<::unity::Il2CppString>,
359        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
360    ) -> crate::moon_sharp::interpreter::table::Table {
361        unsafe {
362            ::unity::il2cpp_call!(__JsonTableConverter_unity_raw::__lookup_json_to_table::get_method_info().method_ptr,crate::moon_sharp::interpreter::table::Table;
363(::unity::Il2CppString)::core::convert::Into::into(json),(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script))
364        }
365    }
366
367    #[doc = "`AssertToken(crate::moon_sharp::interpreter::tree::lexer::Lexer, crate::moon_sharp::interpreter::tree::tokentype::TokenType)` overload"]
368    pub fn assert_token(
369        l: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::lexer::Lexer>,
370        r#type: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::tokentype::TokenType>,
371    ) -> () {
372        unsafe {
373            ::unity::il2cpp_call!(__JsonTableConverter_unity_raw::__lookup_assert_token::get_method_info().method_ptr,();
374(crate::moon_sharp::interpreter::tree::lexer::Lexer)::core::convert::Into::into(l),(crate::moon_sharp::interpreter::tree::tokentype::TokenType)::core::convert::Into::into(r#type))
375        }
376    }
377
378    #[doc = "`ParseJsonArray(crate::moon_sharp::interpreter::tree::lexer::Lexer, crate::moon_sharp::interpreter::script::Script)` overload"]
379    pub fn parse_json_array(
380        l: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::lexer::Lexer>,
381        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
382    ) -> crate::moon_sharp::interpreter::table::Table {
383        unsafe {
384            ::unity::il2cpp_call!(__JsonTableConverter_unity_raw::__lookup_parse_json_array::get_method_info().method_ptr,crate::moon_sharp::interpreter::table::Table;
385(crate::moon_sharp::interpreter::tree::lexer::Lexer)::core::convert::Into::into(l),(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script))
386        }
387    }
388
389    #[doc = "`ParseJsonObject(crate::moon_sharp::interpreter::tree::lexer::Lexer, crate::moon_sharp::interpreter::script::Script)` overload"]
390    pub fn parse_json_object(
391        l: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::lexer::Lexer>,
392        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
393    ) -> crate::moon_sharp::interpreter::table::Table {
394        unsafe {
395            ::unity::il2cpp_call!(__JsonTableConverter_unity_raw::__lookup_parse_json_object::get_method_info().method_ptr,crate::moon_sharp::interpreter::table::Table;
396(crate::moon_sharp::interpreter::tree::lexer::Lexer)::core::convert::Into::into(l),(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script))
397        }
398    }
399
400    #[doc = "`ParseJsonValue(crate::moon_sharp::interpreter::tree::lexer::Lexer, crate::moon_sharp::interpreter::script::Script)` overload"]
401    pub fn parse_json_value(
402        l: impl ::core::convert::Into<crate::moon_sharp::interpreter::tree::lexer::Lexer>,
403        script: impl ::core::convert::Into<crate::moon_sharp::interpreter::script::Script>,
404    ) -> crate::moon_sharp::interpreter::dynvalue::DynValue {
405        unsafe {
406            ::unity::il2cpp_call!(__JsonTableConverter_unity_raw::__lookup_parse_json_value::get_method_info().method_ptr,crate::moon_sharp::interpreter::dynvalue::DynValue;
407(crate::moon_sharp::interpreter::tree::lexer::Lexer)::core::convert::Into::into(l),(crate::moon_sharp::interpreter::script::Script)::core::convert::Into::into(script))
408        }
409    }
410}
411
412#[cfg(feature = "moon_sharp-interpreter-serialization-json-jsontableconverter")]
413impl JsonTableConverter {
414    pub fn table_to_json_method_info() -> &'static ::unity::il2cpp::MethodInfo {
415        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
416    }
417
418    pub fn object_to_json_method_info() -> &'static ::unity::il2cpp::MethodInfo {
419        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
420    }
421
422    pub fn escape_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
423        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
424    }
425
426    pub fn is_value_json_compatible_method_info() -> &'static ::unity::il2cpp::MethodInfo {
427        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
428    }
429
430    pub fn json_to_table_method_info() -> &'static ::unity::il2cpp::MethodInfo {
431        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
432    }
433
434    pub fn assert_token_method_info() -> &'static ::unity::il2cpp::MethodInfo {
435        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
436    }
437
438    pub fn parse_json_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
439        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
440    }
441
442    pub fn parse_json_object_method_info() -> &'static ::unity::il2cpp::MethodInfo {
443        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
444    }
445
446    pub fn parse_json_value_method_info() -> &'static ::unity::il2cpp::MethodInfo {
447        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
448    }
449}
450
451#[cfg(feature = "moon_sharp-interpreter-serialization-json-jsontableconverter")]
452#[doc(hidden)]
453pub mod prelude {
454    pub use super::{IJsonTableConverter, JsonTableConverter};
455    pub use crate::system::object::IObject;
456    #[cfg(feature = "system-object")]
457    pub use crate::system::object::IObjectMethods;
458}