Commit d2daff42 authored by Guillaume Ballet's avatar Guillaume Ballet

fix a serialization error

parent aae61ab1
...@@ -135,10 +135,12 @@ func (path DerivationPath) String() string { ...@@ -135,10 +135,12 @@ func (path DerivationPath) String() string {
return result return result
} }
// MarshalJSON turns a derivation path into its json-serialized string
func (path DerivationPath) MarshalJSON() ([]byte, error) { func (path DerivationPath) MarshalJSON() ([]byte, error) {
return json.Marshal(fmt.Sprintf("\"%s\"", path.String())) return json.Marshal(path.String())
} }
// UnmarshalJSON a json-serialized string back into a derivation path
func (path *DerivationPath) UnmarshalJSON(b []byte) error { func (path *DerivationPath) UnmarshalJSON(b []byte) error {
var dp string var dp string
var err error var err error
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment