6 #ifndef METALL_JSON_PRETTY_PRINT_HPP
7 #define METALL_JSON_PRETTY_PRINT_HPP
14 template <
typename allocator_type,
int indent_size>
18 os << std::boolalpha << jv.
as_bool();
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 <<
"]";
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 <<
"}";
71 template <
typename allocator_type,
int indent_size = 2>
73 template <
typename allocator_type,
int indent_size>
78 jsndtl::pretty_print_impl<allocator_type, indent_size>(os, json_value,