encoding/json: Marshal fails when we define struct variables in lower case: go version go1.4. #11926
Labels
Comments
As far as I can see, this is working as expected. The docs for encoding/json say that each exported struct field becomes a member of the object. Non-exported fields do not. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
package main
import (
"encoding/json"
"fmt"
"os"
)
func main() {
}
Out Put
Marshal Sucess
{"id":1,"firstname":"UpperCase"}
Marshal Failed.
{}____
The text was updated successfully, but these errors were encountered: