@@ -45,7 +45,7 @@ struct deserializer
4545 using result_type = read_result<value_type>;
4646
4747 template <typename Alloc,typename TempAlloc,typename CharT>
48- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset,
48+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset,
4949 basic_staj_cursor<CharT>& cursor)
5050 {
5151 std::size_t line = cursor.line ();
@@ -76,7 +76,7 @@ struct deserializer<T,
7676 using result_type = read_result<value_type>;
7777
7878 template <typename Alloc,typename TempAlloc,typename CharT>
79- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
79+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
8080 {
8181 auto j_result = try_to_json<T>(aset, cursor);
8282 if (JSONCONS_UNLIKELY (!j_result))
@@ -100,7 +100,7 @@ struct deserializer<T,
100100 using result_type = read_result<value_type>;
101101
102102 template <typename Alloc,typename TempAlloc,typename CharT>
103- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>&, basic_staj_cursor<CharT>& cursor)
103+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>&, basic_staj_cursor<CharT>& cursor)
104104 {
105105 std::error_code ec;
106106
@@ -121,7 +121,7 @@ struct deserializer<T,
121121 using string_view_type = basic_string_view<char_type>;
122122
123123 template <typename Alloc,typename TempAlloc,typename CharT>
124- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset,
124+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset,
125125 basic_staj_cursor<CharT>& cursor,
126126 typename std::enable_if<std::is_same<typename T::value_type,CharT>::value,int >::type = 0 )
127127 {
@@ -137,7 +137,7 @@ struct deserializer<T,
137137 }
138138
139139 template <typename Alloc,typename TempAlloc,typename CharT>
140- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset,
140+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset,
141141 basic_staj_cursor<CharT>& cursor,
142142 typename std::enable_if<!std::is_same<typename T::value_type,CharT>::value,int >::type = 0 )
143143 {
@@ -166,7 +166,7 @@ struct deserializer<std::pair<T1, T2>>
166166 using result_type = read_result<value_type>;
167167
168168 template <typename Alloc,typename TempAlloc,typename CharT>
169- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
169+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
170170 {
171171 std::error_code ec;
172172
@@ -185,7 +185,7 @@ struct deserializer<std::pair<T1, T2>>
185185 return result_type (jsoncons::unexpect, ec, cursor.line (), cursor.column ());
186186 }
187187
188- auto r1 = deserializer<T1 >::try_deserialize (aset, cursor);
188+ auto r1 = deserializer<T1 >::deserialize (aset, cursor);
189189 if (JSONCONS_UNLIKELY (!r1))
190190 {
191191 return result_type (jsoncons::unexpect, r1.error ());
@@ -195,7 +195,7 @@ struct deserializer<std::pair<T1, T2>>
195195 {
196196 return result_type (jsoncons::unexpect, ec, cursor.line (), cursor.column ());
197197 }
198- auto r2 = deserializer<T2 >::try_deserialize (aset, cursor);
198+ auto r2 = deserializer<T2 >::deserialize (aset, cursor);
199199 if (JSONCONS_UNLIKELY (!r2))
200200 {
201201 return result_type (jsoncons::unexpect, r2.error ());
@@ -228,7 +228,7 @@ struct deserializer<T,
228228 using result_type = read_result<value_type>;
229229
230230 template <typename Alloc,typename TempAlloc,typename CharT>
231- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
231+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
232232 {
233233 std::error_code ec;
234234 T v (jsoncons::make_obj_using_allocator<T>(aset.get_allocator ()));
@@ -246,7 +246,7 @@ struct deserializer<T,
246246 if (JSONCONS_UNLIKELY (ec)) { return result_type (jsoncons::unexpect, ec, cursor.line (), cursor.column ()); }
247247 while (cursor.current ().event_type () != staj_events::end_array && !ec)
248248 {
249- auto r = deserializer<element_type>::try_deserialize (aset, cursor);
249+ auto r = deserializer<element_type>::deserialize (aset, cursor);
250250 if (!r)
251251 {
252252 return result_type (jsoncons::unexpect, r.error ());
@@ -272,7 +272,7 @@ struct deserializer<T,
272272 using result_type = read_result<value_type>;
273273
274274 template <typename Alloc,typename TempAlloc,typename CharT>
275- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset,
275+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset,
276276 basic_staj_cursor<CharT>& cursor)
277277 {
278278 std::error_code ec;
@@ -322,7 +322,7 @@ struct deserializer<T,
322322 cursor.next (ec);
323323 while (cursor.current ().event_type () != staj_events::end_array && !ec)
324324 {
325- auto r = deserializer<element_type>::try_deserialize (aset, cursor);
325+ auto r = deserializer<element_type>::deserialize (aset, cursor);
326326 if (!r)
327327 {
328328 return result_type (jsoncons::unexpect, r.error ());
@@ -370,7 +370,7 @@ struct deserializer<T,
370370 using result_type = read_result<value_type>;
371371
372372 template <typename Alloc,typename TempAlloc,typename CharT>
373- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
373+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
374374 {
375375 std::error_code ec;
376376
@@ -390,7 +390,7 @@ struct deserializer<T,
390390 cursor.next (ec);
391391 while (cursor.current ().event_type () != staj_events::end_array && !ec)
392392 {
393- auto r = deserializer<element_type>::try_deserialize (aset, cursor);
393+ auto r = deserializer<element_type>::deserialize (aset, cursor);
394394 if (!r)
395395 {
396396 return result_type (jsoncons::unexpect, r.error ());
@@ -435,7 +435,7 @@ struct deserializer<T,
435435 using result_type = read_result<value_type>;
436436
437437 template <typename Alloc,typename TempAlloc,typename CharT>
438- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
438+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
439439 {
440440 std::error_code ec;
441441 T v{jsoncons::make_obj_using_allocator<T>(aset.get_allocator ())};
@@ -456,7 +456,7 @@ struct deserializer<T,
456456 cursor.next (ec);
457457 while (cursor.current ().event_type () != staj_events::end_array && !ec)
458458 {
459- auto r = deserializer<element_type>::try_deserialize (aset, cursor);
459+ auto r = deserializer<element_type>::deserialize (aset, cursor);
460460 if (!r)
461461 {
462462 return result_type (jsoncons::unexpect, r.error ());
@@ -494,7 +494,7 @@ struct deserializer<T,
494494 using result_type = read_result<value_type>;
495495
496496 template <typename Alloc,typename TempAlloc,typename CharT>
497- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
497+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
498498 {
499499 std::error_code ec;
500500
@@ -518,7 +518,7 @@ struct deserializer<T,
518518 auto it = v.begin ();
519519 while (cursor.current ().event_type () != staj_events::end_array)
520520 {
521- auto r = deserializer<element_type>::try_deserialize (aset, cursor);
521+ auto r = deserializer<element_type>::deserialize (aset, cursor);
522522 if (!r)
523523 {
524524 return result_type (jsoncons::unexpect, r.error ());
@@ -558,7 +558,7 @@ struct deserializer<std::array<T,N>>
558558 using result_type = read_result<value_type>;
559559
560560 template <typename Alloc,typename TempAlloc,typename CharT>
561- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
561+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
562562 {
563563 std::error_code ec;
564564
@@ -575,7 +575,7 @@ struct deserializer<std::array<T,N>>
575575 cursor.next (ec);
576576 for (std::size_t i = 0 ; i < N && cursor.current ().event_type () != staj_events::end_array && !ec; ++i)
577577 {
578- auto r = deserializer<element_type>::try_deserialize (aset, cursor);
578+ auto r = deserializer<element_type>::deserialize (aset, cursor);
579579 if (!r)
580580 {
581581 return result_type (jsoncons::unexpect, r.error ());
@@ -605,7 +605,7 @@ struct deserializer<T,
605605 using result_type = read_result<value_type>;
606606
607607 template <typename Alloc,typename TempAlloc,typename CharT>
608- static result_type try_deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
608+ static result_type deserialize (const allocator_set<Alloc,TempAlloc>& aset, basic_staj_cursor<CharT>& cursor)
609609 {
610610 std::error_code ec;
611611
@@ -626,7 +626,7 @@ struct deserializer<T,
626626 {
627627 return result_type{jsoncons::unexpect, json_errc::expected_key, cursor.line (), cursor.column ()};
628628 }
629- auto r0 = deserializer<key_type>::try_deserialize (aset, cursor);
629+ auto r0 = deserializer<key_type>::deserialize (aset, cursor);
630630 if (!r0)
631631 {
632632 return result_type (jsoncons::unexpect, r0.error ());
@@ -637,7 +637,7 @@ struct deserializer<T,
637637 {
638638 return result_type{jsoncons::unexpect, ec, cursor.line (), cursor.column ()};
639639 }
640- auto r1 = deserializer<mapped_type>::try_deserialize (aset, cursor);
640+ auto r1 = deserializer<mapped_type>::deserialize (aset, cursor);
641641 if (!r1)
642642 {
643643 return result_type (jsoncons::unexpect, r1.error ());
0 commit comments