-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding text marshaling and unmarshaling
Note, this removes the JSON specific handling as the general handling covers the JSON case. If this is used with JSON and > or < are used than a custom encoder is required. In Go json.Marshal will escape those. For example... cs, _ := NewConstraint(tc.constraint) buf := new(bytes.Buffer) enc := json.NewEncoder(buf) enc.SetEscapeHTML(false) err = enc.Encode(cs) jsonVal = buf.String() Signed-off-by: Matt Farina <[email protected]>
- Loading branch information
1 parent
00300c4
commit 3c1d0f2
Showing
2 changed files
with
60 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters