-
Notifications
You must be signed in to change notification settings - Fork 911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for JSON #3007
Support for JSON #3007
Commits on Dec 13, 2022
-
chore: Vendor Go 1.17.13 encoding/json
This patch vendors the sources from Go 1.17.13's encoding/json package in the package vim25/json.
Configuration menu - View commit details
-
Copy full SHA for a581fd0 - Browse repository at this point
Copy the full SHA a581fd0View commit details
Commits on Dec 15, 2022
-
chore: JSON Encoding w Discriminator Support
This patch introduces support for discriminators to the "encoding/json" package. A discriminator is a field in a JSON object that indicates the object's type. For example: { "breed": "Lab" } The above JSON does not indicate the Go type into which the object should be decoded. However, it is possible to store that Go type information along with the JSON: { "_typeName": "Dog", "breed": "Lab" } The "_typeName" field teaches the JSON decoder to unmarshal the object into the Go type named "Dog". This patch introduces functions for the json.Encoder and json.Decoder that may be used to active support for discriminators.
Configuration menu - View commit details
-
Copy full SHA for 5caa20a - Browse repository at this point
Copy the full SHA 5caa20aView commit details -
chore: Include LICENSE in vendored JSON pkg
This patch adds Go's LICENSE file to the vendored JSON package.
Configuration menu - View commit details
-
Copy full SHA for 908aa06 - Browse repository at this point
Copy the full SHA 908aa06View commit details -
docs: Add README to vendored JSON pkg
This patch adds a README to the vendored JSON package describing its purpose and how to show the diff between the original sources and the patch applied to the vendored copy.
Configuration menu - View commit details
-
Copy full SHA for e4a3688 - Browse repository at this point
Copy the full SHA e4a3688View commit details -
chore: Exclude vim25/json from CodeStyle workflow
This patch excludes the vendored vim25/json package from the GitHub action that checks code style for Go sources.
Configuration menu - View commit details
-
Copy full SHA for e639aba - Browse repository at this point
Copy the full SHA e639abaView commit details -
This patch updates the type generation code to support adding JSON tags to generated type field data. BREAKING: Updating the `vim25/types` with camelCased, JSON tags affects the output of the `govc` command when using the `-json` flag to emit results as JSON. Field names that used to be PascalCased will now be camelCased. Queries for tools that parse JSON, such as `jq`, will need to be updated to use the new camelCased fields.
Configuration menu - View commit details
-
Copy full SHA for 9920086 - Browse repository at this point
Copy the full SHA 9920086View commit details -
api: JSON Discriminators for vim25/types
This patch adds support to GoVmomi for marshaling/unmarshaling the vim25/types (and other VMODL1 types) to/from JSON using: * a customized version of the Golang encoding/json package that relies upon... * a new discriminator field added to every every complex object marshaled to JSON, the "_typeName" field. this field's value must match the value of the type's registered type name from the type registry
Configuration menu - View commit details
-
Copy full SHA for 4e6d642 - Browse repository at this point
Copy the full SHA 4e6d642View commit details