Election-Tech-Initiative / electionguard-cpp

A C++ implementation of ElectionGuard specification focused on encryption components.
https://www.electionguard.vote/
MIT License
23 stars 26 forks source link

🐞 device json parsing uses wrong format #298

Closed lprichar closed 2 years ago

lprichar commented 2 years ago

Is there an existing issue for this?

Current Behavior

When you pass in the json for a device it should accept this:

{
  "device_id": 91755434160,
  "session_id": 12345,
  "launch_code": 45678,
  "location": "polling-place"
}

however, that produces the error :: eg_encryption_device_from_json:::eg_encryption_device_from_json: [json.exception.type_error.302] type must be number, but is null

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS:

Anything else?

It is currently expecting a device.json file like this, which is the wrong format:

{
  "deviceUuid": 91755434160,
  "sessionUuid": 12345,
  "launchCode": 45678,
  "location": "polling-place"
}