crc-org / vfkit

Apache License 2.0
123 stars 24 forks source link

Add json serialization/deserialization #46

Closed cfergeau closed 1 year ago

cfergeau commented 1 year ago

This allows other projects to write a configuration file based on virtual machine.

This is based on https://github.com/crc-org/vfkit/pull/43 These 2 commits could be merged in the initial one

   json: Fix segfault when json does not have a 'kind' field
   json: Fix 'MashallJSON()' typos

This improves on #43 by adding some unit tests, fixing a few bugs found by the unit tests, and tightening error handling during unmarshalling. I've also simplified the code/refactored it a bit.

cfergeau commented 1 year ago

More json annotations to the struct used by vfkit could be useful, as now the json is not always looking great with respect to capitalization.

baude commented 1 year ago

/approve]

baude commented 1 year ago

/approve

openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: baude

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/crc-org/vfkit/blob/main/OWNERS)~~ [baude] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment