(parent string)
| 425 | } |
| 426 | |
| 427 | func (e encoder) objKeyEncoder(parent string) func(string) string { |
| 428 | if parent == "" { |
| 429 | return func(child string) string { return child } |
| 430 | } |
| 431 | switch e.arrayFmt { |
| 432 | case "brackets": |
| 433 | return func(child string) string { return parent + "[" + child + "]" } |
| 434 | default: |
| 435 | return func(child string) string { return parent + "." + child } |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | // Given a []byte of json (may either be an empty object or an object that already contains entries) |
| 440 | // encode all of the entries in the map to the json byte array. |
no outgoing calls
no test coverage detected