lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 71f259fc28ec722c35b9a8f1f0c52164268b5e86
parent 9ff8e3c72b3a9081a76557cdc08300be2dd7f30c
Author: Sean Enck <sean@ttypty.com>
Date:   Thu, 30 Mar 2023 21:14:57 -0400

this is a better way to convert this value

Diffstat:
Minternal/app/conv.go | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/internal/app/conv.go b/internal/app/conv.go @@ -39,11 +39,7 @@ func serialize(w io.Writer, tx *backend.Transaction) error { if idx > 0 { fmt.Fprintf(w, ",\n") } - obj := backend.JSON{} - if err := json.Unmarshal([]byte(item.Value), &obj); err != nil { - return err - } - b, err := json.MarshalIndent(map[string]backend.JSON{item.Path: obj}, "", " ") + b, err := json.MarshalIndent(map[string]json.RawMessage{item.Path: json.RawMessage([]byte(item.Value))}, "", " ") if err != nil { return err }