Question #221

Author: admin
tags: Go  
package main

import (
	"encoding/json"
	"fmt"
)

type Planet struct {
	Name string
	r    int
}

func main() {
	mars := Planet{"Mars", 3389}
	result, _ := json.Marshal(mars)
	fmt.Println(string(result)) // ??
}
What will be printed?
["Mars", 3389]
{"Name":"Mars","r":3389}
{"Name":"Mars"}
{"r":3389}
{}
Only an exported structural field can become a member of a JSON object.
Rate the difficulty of the question:
easyhard