@@ -8,7 +8,7 @@ use crate::getters::JSONValue;
88/**
99 * @brief getter methods for extracting array types out of a JSON struct
1010 **/
11- impl <let NumBytes : u32 , let NumPackedFields : u16 , let MaxNumTokens : u16 , let MaxNumValues : u16 , let MaxKeyFields : u16 > JSON <NumBytes ,NumPackedFields , MaxNumTokens , MaxNumValues , MaxKeyFields > {
11+ impl <let NumBytes : u32 , let NumPackedFields : u32 , let MaxNumTokens : u32 , let MaxNumValues : u32 , let MaxKeyFields : u32 > JSON <NumBytes ,NumPackedFields , MaxNumTokens , MaxNumValues , MaxKeyFields > {
1212
1313 /**
1414 * @brief if the root JSON is an array, return its length
@@ -23,7 +23,7 @@ impl<let NumBytes: u32, let NumPackedFields: u16, let MaxNumTokens: u16, let Max
2323 * @brief if the root JSON is an object, extract an array given by `key`
2424 * @description returns an Option<JSON> where, if the array exists, the JSON object will have the requested array as its root value
2525 **/
26- fn get_array <let KeyBytes : u16 >(self , key : [u8 ; KeyBytes ]) -> Option <Self > {
26+ fn get_array <let KeyBytes : u32 >(self , key : [u8 ; KeyBytes ]) -> Option <Self > {
2727 assert (self .layer_type_of_root != ARRAY_LAYER , "cannot extract array elements via a key" );
2828 let (exists , key_index ) = self .key_exists_impl (key );
2929 let entry : JSONEntry = self .json_entries_packed [key_index ].into ();
@@ -44,7 +44,7 @@ impl<let NumBytes: u32, let NumPackedFields: u16, let MaxNumTokens: u16, let Max
4444 * @brief if the root JSON is an object, extract an array given by `key`
4545 * @description will revert if the array does not exist
4646 **/
47- fn get_array_unchecked <let KeyBytes : u16 >(self , key : [u8 ; KeyBytes ]) -> Self {
47+ fn get_array_unchecked <let KeyBytes : u32 >(self , key : [u8 ; KeyBytes ]) -> Self {
4848 assert (self .layer_type_of_root != ARRAY_LAYER , "cannot extract array elements via a key" );
4949
5050 let (entry , key_index ) = self .get_json_entry_unchecked_with_key_index (key );
@@ -62,7 +62,7 @@ impl<let NumBytes: u32, let NumPackedFields: u16, let MaxNumTokens: u16, let Max
6262 /**
6363 * @brief same as `get_array` for where the key length may be less than KeyBytes
6464 **/
65- fn get_array_var <let KeyBytes : u16 >(self , key : BoundedVec <u8 , KeyBytes >) -> Option <Self > {
65+ fn get_array_var <let KeyBytes : u32 >(self , key : BoundedVec <u8 , KeyBytes >) -> Option <Self > {
6666 assert (self .layer_type_of_root != ARRAY_LAYER , "cannot extract array elements via a key" );
6767 let (exists , key_index ) = self .key_exists_impl_var (key );
6868 let entry : JSONEntry = self .json_entries_packed [key_index ].into ();
@@ -83,7 +83,7 @@ impl<let NumBytes: u32, let NumPackedFields: u16, let MaxNumTokens: u16, let Max
8383 /**
8484 * @brief same as `get_array_unchecked` for where the key length may be less than KeyBytes
8585 **/
86- fn get_array_unchecked_var <let KeyBytes : u16 >(self , key : BoundedVec <u8 , KeyBytes >) -> Self {
86+ fn get_array_unchecked_var <let KeyBytes : u32 >(self , key : BoundedVec <u8 , KeyBytes >) -> Self {
8787 assert (self .layer_type_of_root != ARRAY_LAYER , "cannot extract array elements via a key" );
8888
8989 let (entry , key_index ) = self .get_json_entry_unchecked_with_key_index_var (key );
0 commit comments