Support JsonCodec.encode for JtsCodecs