client/api/api_client.go
func JSONUnmarshal(data []byte, v interface{}) error {
	if err := json.Unmarshal(data, v); err != nil {
		switch e := err.(type) {
		case *json.SyntaxError:
			line, col := getLineColFromOffset(data, e.Offset)
			return fmt.Errorf("json %s, line: %d, column: %d", e, line, col)
		case *json.UnmarshalTypeError:
			line, col := getLineColFromOffset(data, e.Offset)
			return fmt.Errorf("expected json %s value but got %s, line: %d, column: %d", e.Type, e.Value, line, col)
		}
		return err
	}
	return nil
}
func JSONUnmarshal(data []byte, v interface{}) error {
	if err := json.Unmarshal(data, v); err != nil {
		switch e := err.(type) {
		case *json.SyntaxError:
			line, col := getLineColFromOffset(data, e.Offset)
			return fmt.Errorf("json %s, line: %d, column: %d", e, line, col)
		case *json.UnmarshalTypeError:
			line, col := getLineColFromOffset(data, e.Offset)
			return fmt.Errorf("expected json %s value but got %s, line: %d, column: %d", e.Type, e.Value, line, col)
		}
		return err
	}
	return nil
}
// JSONUnmarshal decodes data into v and returns json.SyntaxError and
// json.UnmarshalTypeError formated with additional information.