You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
mikioh
changed the title
Marshal Fails when we define struct variables in lower case: go version go1.4.
encoding/json: Marshal fails when we define struct variables in lower case: go version go1.4.
Jul 30, 2015
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: