code: func (b *BasicDiff) handleTopLevelChange(line *JSONLine) (*BasicBlock, bool) {
  	switch line.Change {
  	case ChangeNil:
  		if line.Change == ChangeNil {
  			if line.Key != "" {
  				b.Block = &BasicBlock{
  					Title:  line.Key,
  					Change: line.Change,
  				}
  			}
  		}
  
  	case ChangeAdded, ChangeDeleted:
  		return &BasicBlock{
  			Title:     line.Key,
  			Change:    line.Change,
  			New:       line.Val,
  			LineStart: line.LineNum,
  		}, true
  
  	case ChangeOld:
  		b.Block = &BasicBlock{
  			Title:     line.Key,
  			Old:       line.Val,
  			Change:    line.Change,
  			LineStart: line.LineNum,
  		}
  
  	case ChangeNew:
  		b.Block.New = line.Val
  		b.Block.LineEnd = line.LineNum
  
  		// For every "old" change there is a corresponding "new", which
  		// is why we wait until we detect the "new" change before
  		// appending the change.
  		return b.Block, true
  	default:
  		// ok
  	}
  
  	return nil, false
  }
docs: // handleTopLevelChange handles a change on one of the top-level keys on a JSON
  // document.
  //
  // If the line's indentation is at level 1, then we know it's a top
  // level key in the JSON document. As mentioned earlier, we treat these
  // specially as they indicate their values belong to distinct blocks.
  //
  // At level 1, we only record single-line changes, ie, the "added",
  // "deleted", "old" or "new" cases, since we know those values aren't
  // arrays or maps. We only handle these cases at level 2 or deeper,
  // since for those we either output a "change" or "summary". This is
  // done for formatting reasons only, so we have logical "blocks" to
  // display.