Question #222

Author: admin
tags: Go  
package main

import (
	"encoding/json"
	"fmt"
)

type SomeStruct struct {
	A string `json:""`
	B string `json:"-"`
	C string `json:"cake"`
	D string `json:"dog,omitempty"`
	E string `json:",omitempty"`
}

func main() {
	s := SomeStruct{"A", "B", "C", "", "E"}
	result, _ := json.Marshal(s)

	fmt.Println(string(result)) // ??
}
What will be printed?
{"A":"A","B":"B","C":"C","D":"D","E":"E"}
{"A":"A","cake":"C","E":"E"}
{"A":"A","cake":"C","dog":"","E":"E"}
{"A":"A","-":"B","cake":"C","dog":"D","E":"E"}
{"A":"A","-":"B","cake":"C","E":"E"}
{"B":"B","C":"C","D":"D","E":"E"}
{"C":"C","D":"D","E":"E"}
{"cake":"C","dog":"D","E":"E"}
{"cake":"C","dog":"D","E":"E"}
{"cake":"C","dog":"D"}
Rate the difficulty of the question:
easyhard