Skip to content

Conversation

@julienvincent
Copy link

The current rmpv::ext::to_value implementation turns Structs into Value::Array<Value::String> which is not deserializable by other languages.

Technically I would call this a bug and opt to change the existing to_value implementation, but to stay cautious of not breaking existing users' code I think it makes sense to introduce a new to_value_named fn which instead turns Structs into Value::Map and maintains their keys.

Fixes #190

The current `rmpv::ext::to_value` implementation turns Structs into `Value::Array<Value::String>` which is not deserializable by other languages. Technically I would call this a bug and opt to change the existing `to_value` implementation, but to stay cautious of not breaking existing users' code I think it makes sense to introduce a new `to_value_named` fn which instead turns Structs into `Value::Map` and maintains their keys.
@sevenc-nanashi
Copy link

Any updates on this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants