fix JSON marshaling for SecretValue.
This commit is contained in:
parent
09f3c9b73e
commit
851cc327e5
@ -1,5 +1,9 @@
|
||||
package gosecret
|
||||
|
||||
import (
|
||||
`fmt`
|
||||
)
|
||||
|
||||
/*
|
||||
MarshalJSON converts a SecretValue to a JSON representation.
|
||||
For compat reasons, the MarshalText is left "unmolested" (i.e. renders to a Base64 value).
|
||||
@ -7,7 +11,7 @@ package gosecret
|
||||
*/
|
||||
func (s *SecretValue) MarshalJSON() (b []byte, err error) {
|
||||
|
||||
b = []byte(string(*s))
|
||||
b = []byte(fmt.Sprintf("\"%v\"", string(*s)))
|
||||
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user