mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2025-11-25 22:45:00 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -171,6 +171,31 @@ namespace OpenWifi::GWObjects {
|
||||
field_to_json(Obj, "lastModified", LastModified);
|
||||
}
|
||||
|
||||
void DefaultFirmware::to_json(Poco::JSON::Object &Obj) const {
|
||||
field_to_json(Obj, "name", Name);
|
||||
field_to_json(Obj, "description", Description);
|
||||
field_to_json(Obj, "modelIds", Models);
|
||||
field_to_json(Obj, "uri", uri);
|
||||
field_to_json(Obj, "imageCreationDate", imageCreationDate);
|
||||
field_to_json(Obj, "created", Created);
|
||||
field_to_json(Obj, "lastModified", LastModified);
|
||||
}
|
||||
|
||||
bool DefaultFirmware::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||
try {
|
||||
field_from_json(Obj, "name", Name);
|
||||
field_from_json(Obj, "description", Description);
|
||||
field_from_json(Obj, "modelIds", Models);
|
||||
field_from_json(Obj, "uri", uri);
|
||||
field_from_json(Obj, "imageCreationDate", imageCreationDate);
|
||||
field_from_json(Obj, "created", Created);
|
||||
field_from_json(Obj, "lastModified", LastModified);
|
||||
return true;
|
||||
} catch (const Poco::Exception &E) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void CommandDetails::to_json(Poco::JSON::Object &Obj) const {
|
||||
EmbedDocument("details", Obj, Details);
|
||||
EmbedDocument("results", Obj, Results);
|
||||
|
||||
Reference in New Issue
Block a user