🧩 BCS
Encode JSON to BCS bytes and decode BCS bytes back, using a type you describe.
Types: u8, u16, u32, u64, u128, u256, bool, string, address, vector<T>, option<T>, [T; N], (A, B), struct { name: T, … }, enum { A, B(T), C { x: T } }. Move names such as 0x1::string::String, 0x2::object::ID and 0x1::option::Option<T> also work.
Encode
Numbers above u32 can be strings; bytes (vector<u8>) can be a hex string; option is null or the value; an enum is "Variant" or { "Variant": value }.
Decode