()
| 539 | } |
| 540 | |
| 541 | func ExampleIntIntMap_MarshalJSON() { |
| 542 | var m gmap.IntIntMap |
| 543 | m.Sets(g.MapIntInt{ |
| 544 | 1: 1, |
| 545 | 2: 2, |
| 546 | 3: 3, |
| 547 | 4: 4, |
| 548 | }) |
| 549 | |
| 550 | bytes, err := json.Marshal(&m) |
| 551 | if err == nil { |
| 552 | fmt.Println(gconv.String(bytes)) |
| 553 | } |
| 554 | |
| 555 | // Output: |
| 556 | // {"1":1,"2":2,"3":3,"4":4} |
| 557 | } |
| 558 | |
| 559 | func ExampleIntIntMap_UnmarshalJSON() { |
| 560 | var m gmap.IntIntMap |