summaryrefslogtreecommitdiff
path: root/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h')
-rw-r--r--src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
index e248954552..ab0289b293 100644
--- a/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
+++ b/src/components/formatters/include/formatters/CFormatterJsonSDLRPCv2.h
@@ -73,11 +73,14 @@ class CFormatterJsonSDLRPCv2 : public CFormatterJsonBase {
*
* @param obj input SmartObject
* @param outStr resulting JSON string
+ * @param remove_unknown_parameters contains true if need to remove unknown
+ *parameters
* @return true if success, false otherwise
*/
static bool toString(
const ns_smart_device_link::ns_smart_objects::SmartObject& obj,
- std::string& outStr);
+ std::string& outStr,
+ const bool remove_unknown_parameters = true);
/**
* @brief Creates a SmartObject from a JSON string.
@@ -128,12 +131,15 @@ class CFormatterJsonSDLRPCv2 : public CFormatterJsonBase {
* @param schema Smart schema which describes 'fake' smart object to be
*formatted
* @param outStr Resulting JSON string
+ * @param remove_unknown_parameters contains true if need to remove unknown
+ *parameters
* @return formatting error code
*/
static tMetaFormatterErrorCode MetaFormatToString(
const ns_smart_device_link::ns_smart_objects::SmartObject& object,
const ns_smart_device_link::ns_smart_objects::CSmartSchema& schema,
- std::string& outStr);
+ std::string& outStr,
+ const bool remove_unknown_parameters = true);
};
template <typename FunctionId, typename MessageType>
@@ -182,8 +188,8 @@ inline bool CFormatterJsonSDLRPCv2::fromString(
return result;
}
-}
-}
-} // namespace ns_smart_device_link::ns_json_handler::formatters
+} // namespace formatters
+} // namespace ns_json_handler
+} // namespace ns_smart_device_link
#endif // SRC_COMPONENTS_FORMATTERS_INCLUDE_FORMATTERS_CFORMATTERJSONSDLRPCV2_H_