|
PcapPlusPlus
Next
|
#include <Serializers.h>
Public Member Functions | |
| JsonSerializer (std::ostream &out, int indent=-1) | |
Public Member Functions inherited from pcpp::ISerializer | |
| virtual | ~ISerializer ()=default |
| Destroy the serializer. | |
| ArrayScope | writeArray (const FieldDescriptor &field) |
| ObjectScope | writeObject (const FieldDescriptor &field) |
Serializer that writes JSON.
|
explicit |
Create a JSON serializer.
By default the serializer produces minified JSON. If indent is non-negative, the serializer produces pretty-printed JSON with the specified number of spaces per indentation level.
| [in] | out | The output stream to which JSON is written |
| [in] | indent | The number of spaces to use for each indentation level (negative for minified JSON) |