6#ifndef METALL_JSON_PRETTY_PRINT_HPP
7#define METALL_JSON_PRETTY_PRINT_HPP
14template <
typename allocator_type,
int indent_size>
16 const std::string &indent) {
18 os << std::boolalpha << jv.
as_bool();
30 std::string new_indent = indent;
31 new_indent.append(indent_size,
' ');
32 for (std::size_t i = 0; i < arr.size(); ++i) {
34 pretty_print_impl<allocator_type, indent_size>(os, arr[i], new_indent);
35 if (i < arr.size() - 1) {
39 os <<
"\n" << indent <<
"]";
43 std::string new_indent = indent;
44 new_indent.append(indent_size,
' ');
45 for (
auto it = obj.begin();;) {
46 os << new_indent << it->key() <<
" : ";
47 pretty_print_impl<allocator_type, indent_size>(os, it->value(),
49 if (++it == obj.end()) {
54 os <<
"\n" << indent <<
"}";
71template <
typename allocator_type,
int indent_size = 2>
73template <
typename allocator_type,
int indent_size>
78 jsndtl::pretty_print_impl<allocator_type, indent_size>(os, json_value,