Skip to content

Commit 997b112

Browse files
committed
doc update
1 parent 32ebfc8 commit 997b112

34 files changed

+234
-238
lines changed

doc/Classes/csv_parameters.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
### jsoncons::csv::csv_parameters
2+
13
Parameter | Description | Default
24
------------- | ------------- | -------------
35
assume_header | Assume first row in file is header, use field names to construct objects | false

doc/Classes/csv_reader.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
```c++
2-
jsoncons::csv::csv_reader
3-
```
1+
### jsoncons::csv::csv_reader
42

53
The `csv_reader` class is an instantiation of the `basic_csv_reader` class template that uses `char` as the character type. It reads a [CSV file](http://tools.ietf.org/html/rfc4180) and produces JSON parse events.
64

75
`csv_reader` is noncopyable and nonmoveable.
86

9-
### Header
7+
#### Header
108
```c++
119
#include <jsoncons_ext/csv/csv_reader.hpp>
1210
```
13-
### Constructors
11+
#### Constructors
1412

1513
csv_reader(std::istream& is,
1614
json_input_handler& handler)
@@ -46,7 +44,7 @@ JSON events, the specified [parse_error_handler](parse_error_handler.md),
4644
and [csv_parameters](csv_parameters.md).
4745
You must ensure that the input stream, input handler, and error handler exist as long as does `csv_reader`, as `csv_reader` holds pointers to but does not own these objects.
4846

49-
### Member functions
47+
#### Member functions
5048

5149
bool eof() const
5250
Returns `true` when there is no more data to be read from the stream, `false` otherwise
@@ -61,7 +59,7 @@ Throws [parse_error](parse_error.md) if parsing fails.
6159

6260
### Examples
6361

64-
### Reading a comma delimted file into an array of json values
62+
#### Reading a comma delimted file into an array of json values
6563

6664
#### Comma delimited input file
6765
```
@@ -99,7 +97,7 @@ std::cout << pretty_print(countries) << std::endl;
9997
["WLF","WALLIS & FUTUNA ISLANDS"]
10098
]
10199
```
102-
### Reading a tab delimted file into an array of json objects
100+
#### Reading a tab delimted file into an array of json objects
103101

104102
#### Tab delimited input file
105103
```
@@ -214,7 +212,7 @@ std::cout << pretty_print(countries) << std::endl;
214212
```
215213

216214

217-
### Reading a comma delimited file with different mapping options
215+
#### Reading a comma delimited file with different mapping options
218216

219217
#### Input
220218

doc/Classes/csv_serializer.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
```c++
2-
jsoncons::csv::csv_serializer
3-
```
1+
### jsoncons::csv::csv_serializer
2+
43
The `csv_serializer` class is an instantiation of the `basic_csv_serializer` class template that uses `char` as the character type. It implements [json_output_handler](json_output_handler.md) and supports formatting a JSON value as a [CSV file](http://tools.ietf.org/html/rfc4180).
54

65
`csv_serializer` is noncopyable and nonmoveable.
76

8-
### Header
7+
#### Header
98
```c++
109
#include <jsoncons_ext/csv/csv_serializer.hpp>
1110
```
12-
### Constructors
11+
#### Constructors
1312

1413
csv_serializer(std::ostream& os)
1514
Constructs a `csv_serializer` that is associated with an output stream
@@ -22,10 +21,10 @@ Constructs a `csv_serializer` that is associated with an output stream
2221
`os` and [csv_parameters](csv_parameters.md).
2322
You must ensure that the output stream exists as long as does `csv_serializer`, as `json_serializer` holds a pointer to but does not own this object.
2423

25-
### Member functions
24+
#### Member functions
2625

2726

28-
### Destructor
27+
#### Destructor
2928

3029
virtual ~json_serializer()
3130

doc/Classes/decode_cbor.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
```c++
2-
jsoncons::cbor::decode_cbor
3-
```
1+
### jsoncons::cbor::decode_cbor
2+
43
Decodes a [cbor](http://cbor.io/) binary serialization format to a json value.
54

6-
### Header
5+
#### Header
76
```c++
87
#include <jsoncons_ext/cbor/cbor.hpp>
98

109
template<class Json>
1110
Json decode_cbor(const std::vector<uint8_t>& v)
1211
```
1312
14-
### See also
13+
#### See also
1514
1615
- [encode_cbor](encode_cbor.md) encodes a json value to the [cbor](http://cbor.io/) binary serialization format.
1716

doc/Classes/decode_msgpack.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
```c++
2-
jsoncons::msgpack::decode_msgpack
3-
```
1+
### jsoncons::msgpack::decode_msgpack
2+
43
Decodes a [MessagePack](http://msgpack.org/index.html) binary serialization format to a json value.
54

6-
### Header
5+
#### Header
76
```c++
87
#include <jsoncons_ext/msgpack/msgpack.hpp>
98

109
template<class Json>
1110
Json decode_msgpack(const std::vector<uint8_t>& v)
1211
```
1312
14-
### See also
13+
#### See also
1514
1615
- [encode_msgpack](encode_msgpack.md) encodes a json value to the [MessagePack](http://msgpack.org/index.html) binary serialization format.
1716

doc/Classes/default_parse_error_handler.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
jsoncons::default_parse_error_handler
1+
### jsoncons::default_parse_error_handler
22

3-
typedef basic_default_parse_error_handler<char> default_parse_error_handler
3+
```c++
4+
typedef basic_default_parse_error_handler<char> default_parse_error_handler
5+
```
46

5-
### Header
7+
#### Header
68

79
#include <jsoncons/parse_error_handler.hpp>
810

9-
### Base class
11+
#### Base class
1012

1113
[parse_error_handler](parse_error_handler.md)
1214

13-
### Static memebr functions
15+
#### Static memebr functions
1416

1517
static parse_error_handler& instance()
1618
Returns a singleton instance of a `default_parse_error_handler`
1719

18-
### Private virtual implementation methods
20+
##### Private virtual implementation methods
1921

2022
bool do_error(std::error_code ec,
2123
const parsing_context& context) override

doc/Classes/dump.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
```c++
2-
jsoncons::dump
3-
```
1+
### jsoncons::dump
2+
43
Serialize C++ object to a JSON formatted stream, governed by `json_stream_traits`
54

6-
### Header
5+
#### Header
76
```c++
87
#include <jsoncons/json_stream_traits.hpp>
98

@@ -32,7 +31,7 @@ void dump(const T& val, const basic_serialization_options<CharT>& options,
3231
3332
(2) Applies `json_stream_traits` to serialize `val` to JSON output stream, but does not call begin_json() and `end_json()`.
3433
35-
### Parameters
34+
#### Parameters
3635
3736
<table>
3837
<tr>
@@ -57,11 +56,11 @@ void dump(const T& val, const basic_serialization_options<CharT>& options,
5756
</tr>
5857
</table>
5958
60-
### Return value
59+
#### Return value
6160
6261
None
6362
64-
### See also
63+
#### See also
6564
6665
- [json_output_handler](json_output_handler.md)
6766
- [serialization_options](serialization_options.md)

doc/Classes/encode_cbor.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
```c++
2-
jsoncons::cbor::encode_cbor
3-
```
1+
### jsoncons::cbor::encode_cbor
2+
43
Encodes a json value to the [cbor](http://cbor.io/) binary serialization format.
54

6-
### Header
5+
#### Header
76
```c++
87
#include <jsoncons_ext/cbor/cbor.hpp>
98

109
template<class Json>
1110
std::vector<uint8_t> encode_cbor(const Json& jval)
1211
```
1312
13+
#### See also
14+
15+
- [decode_cbor](decode_cbor) decodes a [cbor](http://cbor.io/) binary serialization format to a json value.
16+
1417
### Examples
1518
1619
## cbor example
@@ -87,8 +90,4 @@ Output:
8790
}
8891
```
8992

90-
### See also
91-
92-
- [decode_cbor](decode_cbor) decodes a [cbor](http://cbor.io/) binary serialization format to a json value.
93-
9493

doc/Classes/encode_msgpack.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
```c++
2-
jsoncons::msgpack::encode_msgpack
3-
```
1+
### jsoncons::msgpack::encode_msgpack
2+
43
Encodes a json value to the [MessagePack](http://msgpack.org/index.html) binary serialization format.
54

6-
### Header
5+
#### Header
76
```c++
87
#include <jsoncons_ext/msgpack/msgpack.hpp>
98

109
template<class Json>
1110
std::vector<uint8_t> encode_msgpack(const Json& jval)
1211
```
1312
13+
#### See also
14+
15+
- [decode_msgpack](decode_msgpack) decodes a [MessagePack](http://msgpack.org/index.html) binary serialization format to a json value.
16+
1417
### Examples
1518
16-
## MessagePack example
19+
#### MessagePack example
1720
1821
```c++
1922
#include <jsoncons/json.hpp>
@@ -87,8 +90,4 @@ Output:
8790
}
8891
```
8992

90-
### See also
91-
92-
- [decode_msgpack](decode_msgpack) decodes a [MessagePack](http://msgpack.org/index.html) binary serialization format to a json value.
93-
9493

0 commit comments

Comments
 (0)