fossology / LicenseDb

GNU General Public License v2.0
12 stars 9 forks source link

fix(patch_obligation): Fix patch request bugs in obligation #49

Closed deo002 closed 8 months ago

deo002 commented 8 months ago

When we unmarshal json, the undefined keys take zero values in structs. So, there is no way to differentiate between an undefined value and an actual zero value when it is passed in json in a PATCH request. Example: { "active": false, "text": "Lorem ipsum" } and { "text": "Lorem ipsum" } Structs of both these unmarshalled json objects will have active as false.