Make UEFI boot-platform build again
[haiku.git] / headers / private / shared / JsonWriter.h
blob67ae5114f347d0a7e174ed4d35255bf427fbe650
1 /*
2 * Copyright 2017, Andrew Lindesay <apl@lindesay.co.nz>
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _JSON_WRITER_H
6 #define _JSON_WRITER_H
9 #include "JsonEventListener.h"
11 #include <DataIO.h>
12 #include <String.h>
15 namespace BPrivate {
17 class BJsonWriter : public BJsonEventListener {
18 public:
19 BJsonWriter();
20 virtual ~BJsonWriter();
22 void HandleError(status_t status, int32 line,
23 const char* message);
24 status_t ErrorStatus();
26 status_t WriteBoolean(bool value);
27 status_t WriteTrue();
28 status_t WriteFalse();
29 status_t WriteNull();
31 status_t WriteInteger(int64 value);
32 status_t WriteDouble(double value);
34 status_t WriteString(const char* value);
36 status_t WriteObjectStart();
37 status_t WriteObjectName(const char* value);
38 status_t WriteObjectEnd();
40 status_t WriteArrayStart();
41 status_t WriteArrayEnd();
43 protected:
44 status_t fErrorStatus;
48 } // namespace BPrivate
50 using BPrivate::BJsonWriter;
52 #endif // _JSON_WRITER_H