code: func parseJSON(rest string, d *Directive) (*Node, map[string]bool, error) {
  	rest = strings.TrimLeftFunc(rest, unicode.IsSpace)
  	if !strings.HasPrefix(rest, "[") {
  		return nil, nil, fmt.Errorf(`Error parsing "%s" as a JSON array`, rest)
  	}
  
  	var myJSON []interface{}
  	if err := json.NewDecoder(strings.NewReader(rest)).Decode(&myJSON); err != nil {
  		return nil, nil, err
  	}
  
  	var top, prev *Node
  	for _, str := range myJSON {
  		s, ok := str.(string)
  		if !ok {
  			return nil, nil, errDockerfileNotStringArray
  		}
  
  		node := &Node{Value: s}
  		if prev == nil {
  			top = node
  		} else {
  			prev.Next = node
  		}
  		prev = node
  	}
  
  	return top, map[string]bool{"json": true}, nil
  }
docs: // parseJSON converts JSON arrays to an AST.