conduit icon indicating copy to clipboard operation
conduit copied to clipboard

json base64 parse doesn't do what it is supposed to

Open JustinPrivitera opened this issue 4 months ago • 8 comments

std::string RC_CINEMA_WEB =  R"xyzxyz(

{
  "schema": 
  {
    "index.html": {"dtype":"char8_str","number_of_elements": 1,"offset": 0,"stride": 1,"element_bytes": 1,"endianness": "little"},
    "cvlib": {"dtype":"char8_str","number_of_elements": 1,"offset": 1,"stride": 1,"element_bytes": 1,"endianness": "little"}
  },
  "data": 
  {
    "base64": "ab"
  }
}
)xyzxyz";

conduit::Node res;
res.parse(RC_CINEMA_WEB,"conduit_base64_json");
std::cout << res.to_yaml() << std::endl;

gives you

index.html: "i�"
cvlib: "�"

Both should be a single character long. index.html is picking up the character from cvlib.

JustinPrivitera avatar Oct 09 '24 16:10 JustinPrivitera