You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using the external_constructor<value_t::binary> I get the external_constructor<value_t::array> .
I tried adding something like !std::is_same<typename BasicJsonType::binary_t::container_type, CompatibleArrayType>::value in the template arguments and works for my case but
===============================================================================
/home/lemon/repos/json_fork/tests/src/unit-bjdata.cpp:208:
TEST CASE: BJData
individual values
binary
Other Serializations
No Count No Type
~/repos/json_fork/tests/src/unit-bjdata.cpp:1731: ERROR: CHECK( json::from_bjdata(result) == j_out ) is NOT correct!
values: CHECK( [120,120,120,120,120,120,120,120,120,120] == {"bytes":[120,120,120,120,120,120,120,120,120,120],"subtype":null} )
~/repos/json_fork/tests/src/unit-bjdata.cpp:1732: ERROR: CHECK( json::from_bjdata(result, true, false) == j_out ) is NOT correct!
values: CHECK( [120,120,120,120,120,120,120,120,120,120] == {"bytes":[120,120,120,120,120,120,120,120,120,120],"subtype":null} )
===============================================================================
~/repos/json_fork/tests/src/unit-bjdata.cpp:208:
TEST CASE: BJData
individual values
binary
Other Serializations
Yes Count No Type
~/repos/json_fork/tests/src/unit-bjdata.cpp:1758: ERROR: CHECK( json::from_bjdata(result) == j_out ) is NOT correct!
values: CHECK( [120,120,120,120,120,120,120,120,120,120] == {"bytes":[120,120,120,120,120,120,120,120,120,120],"subtype":null} )
~/repos/json_fork/tests/src/unit-bjdata.cpp:1759: ERROR: CHECK( json::from_bjdata(result, true, false) == j_out ) is NOT correct!
values: CHECK( [120,120,120,120,120,120,120,120,120,120] == {"bytes":[120,120,120,120,120,120,120,120,120,120],"subtype":null} )
===============================================================================
[doctest] test cases: 25 | 24 passed | 1 failed | 0 skipped
[doctest] assertions: 692193 | 691653 passed | 540 failed |
[doctest] Status: FAILURE!
So this BJData is an array by design? Could it be a binary_type_with_subtype?
Thanks
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The binary representation I want to use is
std::vector<char>
but the following test failsInstead of using the
external_constructor<value_t::binary>
I get theexternal_constructor<value_t::array>
.I tried adding something like
!std::is_same<typename BasicJsonType::binary_t::container_type, CompatibleArrayType>::value
in the template arguments and works for my case butSo this BJData is an array by design? Could it be a binary_type_with_subtype?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions