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
feat(data): enhance unmarshaler with JSON string to struct conversion (#1116)
Because
- YAML multiline strings containing JSON schemas (like `response-schema:
|`) could not be automatically converted to Go struct types like
`genai.Schema`
This commit
- Adds automatic JSON string → struct conversion capability to the core
unmarshaling framework
- Implements fast pre-check (`stringValue[0] == '{'` or `'['`) to avoid
unnecessary JSON parsing overhead on regular strings
- Adds `tryUnmarshalJSONString()` helper function that uses direct
`json.Unmarshal` to preserve complex nested structures
0 commit comments