diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/m_json.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/m_json.h b/include/m_json.h index 9556becc00..99266e27d7 100644 --- a/include/m_json.h +++ b/include/m_json.h @@ -124,10 +124,13 @@ class JSONROOT JSONNODE *m_node;
public:
- __forceinline JSONROOT(LPCSTR text) { m_node = json_parse(text); }
+ __forceinline JSONROOT() { m_node = NULL; }
+ __forceinline JSONROOT(LPCSTR text) { Parse(text); }
__forceinline ~JSONROOT() { json_delete(m_node); }
__forceinline operator JSONNODE*() const { return m_node; }
+
+ __forceinline JSONNODE* Parse(LPCSTR text) { return (m_node = json_parse(text)); }
};
#ifdef _XSTRING_
|