// NewStateFromJSON creates State from JSON.
NewStateFromJSON creates State from JSON.
// NewStateFromJSON creates State from JSON .
func NewStateFromJSON(r io.Reader) (State, error) {
	p := NewState()
	decoder := json.NewDecoder(r)
	err := decoder.Decode(&p)
	return p, err
}
func NewStateFromJSON ( r io . Reader ) ( State , error ) { p := NewState ( ) decoder := json . NewDecoder ( r ) err := decoder . Decode ( & p ) return p , err }
NewStateFromJSON creates State from JSON.
NewStateFromJSON creates State from JSON .