Skip to content

Commit

Permalink
Undo indentation change.
Browse files Browse the repository at this point in the history
  • Loading branch information
scr-oath committed Jan 10, 2025
1 parent 4d2b303 commit b924168
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions sjson.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,18 +427,19 @@ func isOptimisticPath(path string) bool {
//
// A path is a series of keys separated by a dot.
//
// {
// "name": {"first": "Tom", "last": "Anderson"},
// "age":37,
// "children": ["Sara","Alex","Jack"],
// "friends": [
// {"first": "James", "last": "Murphy"},
// {"first": "Roger", "last": "Craig"}
// ]
// }
// "name.last" >> "Anderson"
// "age" >> 37
// "children.1" >> "Alex"
// {
// "name": {"first": "Tom", "last": "Anderson"},
// "age":37,
// "children": ["Sara","Alex","Jack"],
// "friends": [
// {"first": "James", "last": "Murphy"},
// {"first": "Roger", "last": "Craig"}
// ]
// }
// "name.last" >> "Anderson"
// "age" >> 37
// "children.1" >> "Alex"
//
func Set(json, path string, value interface{}) (string, error) {
return SetOptions(json, path, value, nil)
}
Expand Down

0 comments on commit b924168

Please sign in to comment.