#ifndef ANGELSCRIPTDEBUGGER_UTILS_HPP
#define ANGELSCRIPTDEBUGGER_UTILS_HPP

#define JsonSerializeOptional(obj, field)                                                                              \
    if (field.has_value())                                                                                             \
    obj[#field] = field.value()

#define JsonDeserializeOptional(obj, field)                                                                            \
    if (!obj[#field].empty())                                                                                          \
        field = obj[#field]

#endif // ANGELSCRIPTDEBUGGER_UTILS_HPP
