Treelite
Functions
json_serializer.cc File Reference

Reference serializer implementation, which serializes to JSON. This is useful for testing correctness of the binary serializer. More...

#include <treelite/tree.h>
#include <treelite/logging.h>
#include <rapidjson/ostreamwrapper.h>
#include <rapidjson/writer.h>
#include <rapidjson/prettywriter.h>
#include <ostream>
#include <type_traits>
#include <cstdint>
#include <cstddef>
Include dependency graph for json_serializer.cc:

Go to the source code of this file.

Functions

template<typename WriterType , typename ThresholdType , typename LeafOutputType >
void DumpTreeAsJSON (WriterType &writer, const Tree< ThresholdType, LeafOutputType > &tree)
 
template<typename WriterType , typename ThresholdType , typename LeafOutputType >
void DumpModelAsJSON (WriterType &writer, const ModelImpl< ThresholdType, LeafOutputType > &model)
 

Detailed Description

Reference serializer implementation, which serializes to JSON. This is useful for testing correctness of the binary serializer.

Copyright (c) 2020-2021 by Contributors

Author
Hyunsu Cho

Definition in file json_serializer.cc.