Skip to content

Commit 43e7433

Browse files
committed
update Java version
1 parent bdf1e58 commit 43e7433

19 files changed

+4767
-4133
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Written by Peter O. Any copyright to this work is released to the Public Domain. In case this is not possible, this work is also licensed under Creative Commons Zero (CC0): [http://creativecommons.org/publicdomain/zero/1.0/](http://creativecommons.org/publicdomain/zero/1.0/)
1+
Written by Peter O. Any copyright to this work is released to the Public Domain. In case this is not possible, this work is also licensed under Creative Commons Zero (CC0): [http://creativecommons.org/publicdomain/zero/1.0/](http://creativecommons.org/publicdomain/zero/1.0/)

README.md

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
CBOR
2-
====
1+
# CBOR
32

43
[![Maven Central](https://img.shields.io/maven-central/v/com.upokecenter/cbor.svg?style=plastic)](https://search.maven.org/#search|ga|1|g%3A%22com.upokecenter%22%20AND%20a%3A%22cbor%22)
54

65
If you like this software, consider donating to me at this link: [http://peteroupc.github.io/](http://peteroupc.github.io/)
76

8-
----
7+
---
98

109
A Java implementation of Concise Binary Object Representation, a general-purpose binary data format defined in RFC 7049. According to that RFC, CBOR's data model "is an extended version of the JSON data model", supporting many more types of data than JSON. "CBOR was inspired by MessagePack", but "is not intended as a version of or replacement for MessagePack."
1110

@@ -15,8 +14,8 @@ This implementation also doubles as a reader and writer of JSON, and can convert
1514

1615
Finally, this implementation supports arbitrary-precision binary and decimal floating-point numbers and rational numbers with arbitrary-precision components.
1716

18-
How to Install
19-
---------
17+
## How to Install
18+
2019
Starting with version 0.23.0, the Java implementation is available
2120
as an [artifact](https://search.maven.org/#search|ga|1|g%3A%22com.upokecenter%22%20AND%20a%3A%22cbor%22) in the Central Repository. To add this library to a Maven
2221
project, add the following to the `dependencies` section in your `pom.xml` file:
@@ -32,17 +31,15 @@ project, add the following to the `dependencies` section in your `pom.xml` file:
3231
In other Java-based environments, the library can be referred to by its
3332
group ID (`com.upokecenter`), artifact ID (`cbor`), and version, as given above.
3433

35-
Documentation
36-
------------
34+
## Documentation
3735

3836
This library defines one class, called CBORObject, that allows you to read and
3937
write CBOR objects to and from data streams and byte arrays, and to convert JSON
4038
text to CBOR objects and back.
4139

4240
**See the [Java API documentation](https://peteroupc.github.io/CBOR/api/).**
4341

44-
Examples
45-
----------
42+
## Examples
4643

4744
Reading data from a file.
4845

@@ -84,12 +81,11 @@ try (FileOutputStream stream = new FileOutputStream("object.cbor")) {
8481
NOTE: All code samples in this section are released to the Public Domain,
8582
as explained in <http://creativecommons.org/publicdomain/zero/1.0/>.
8683

87-
Source Code
88-
---------
84+
## Source Code
85+
8986
Source code is available in the [project page](https://github.com/peteroupc/CBOR-Java).
9087

91-
About
92-
-----------
88+
## About
9389

9490
Written in 2013-2016 by Peter O.
9591

@@ -101,34 +97,33 @@ licensed under Creative Commons Zero (CC0):
10197
If you like this, you should donate to Peter O.
10298
at: [http://peteroupc.github.io/CBOR/](http://peteroupc.github.io/CBOR/)
10399

104-
Clarifications
105-
------------------
100+
## Clarifications
106101

107102
The following are some clarifications to RFC 7049.
108103

109-
* Section 2.4.2 doesn't specify what happens if a bignum's byte
110-
string has a length of 0. This implementation treats a positive
104+
- Section 2.4.2 doesn't specify what happens if a bignum's byte
105+
string has a length of 0. This implementation treats a positive
111106
bignum with length 0 as having a value of 0 and a negative
112107
bignum with length 0 as having a value of -1.
113-
* Section 2.4.1 specifies the number of seconds since the start of 1970. It is
108+
- Section 2.4.1 specifies the number of seconds since the start of 1970. It is
114109
based on the POSIX definition of "seconds since the Epoch", which
115-
the RFC cites as a normative reference. This definition does not
116-
count leap seconds. When this implementation supports date
117-
conversion, it won't count leap seconds, either. This implementation
110+
the RFC cites as a normative reference. This definition does not
111+
count leap seconds. When this implementation supports date
112+
conversion, it won't count leap seconds, either. This implementation
118113
treats values of infinity and NaN as invalid.
119-
* For tag 32, this implementation accepts strings that are valid
114+
- For tag 32, this implementation accepts strings that are valid
120115
Internationalized Resource Identifiers (IRIs) in addition to URIs.
121116
IRI are like URIs except that they also allow non-ASCII characters.
122117

123-
Release Notes
124-
-----------
118+
## Release Notes
119+
125120
For release notes, see the [CBOR .NET repository](https://github.com/peteroupc/CBOR).
126121

127122
The [commit history](https://github.com/peteroupc/CBOR-Java/commits/master)
128123
contains details on code changes in previous versions.
129124

130-
Acknowledgments
131-
-----------
125+
## Acknowledgments
126+
132127
For acknowledgments, see the [CBOR .NET repository](https://github.com/peteroupc/CBOR).
133128

134129
I thank all users who sent issues to this repository.

api/Home.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
# API Documentation
22

3-
* [com.upokecenter.cbor.ICBORConverter&amp;lt;T&amp;gt;](com.upokecenter.cbor.ICBORConverter.md) -
4-
Interface implemented by classes that convert objects of arbitrary types to
5-
CBOR objects.
3+
- [com.upokecenter.cbor.ICBORConverter&amp;lt;T&amp;gt;](com.upokecenter.cbor.ICBORConverter.md) -
4+
Interface implemented by classes that convert objects of arbitrary types to
5+
CBOR objects.
66

7-
* [com.upokecenter.cbor.ICBORToFromConverter&amp;lt;T&amp;gt;](com.upokecenter.cbor.ICBORToFromConverter.md) -
8-
Classes that implement this interface can support conversions from CBOR
9-
objects to a custom type and back.
7+
- [com.upokecenter.cbor.ICBORToFromConverter&amp;lt;T&amp;gt;](com.upokecenter.cbor.ICBORToFromConverter.md) -
8+
Classes that implement this interface can support conversions from CBOR
9+
objects to a custom type and back.
1010

11-
* [com.upokecenter.cbor.CBORDataUtilities](com.upokecenter.cbor.CBORDataUtilities.md) -
12-
Contains methods useful for reading and writing data, with a focus on CBOR.
11+
- [com.upokecenter.cbor.CBORDataUtilities](com.upokecenter.cbor.CBORDataUtilities.md) -
12+
Contains methods useful for reading and writing data, with a focus on CBOR.
1313

14-
* [com.upokecenter.cbor.CBORDateConverter](com.upokecenter.cbor.CBORDateConverter.md) -
15-
A class for converting date-time objects to and from tagged CBOR
14+
- [com.upokecenter.cbor.CBORDateConverter](com.upokecenter.cbor.CBORDateConverter.md) -
15+
A class for converting date-time objects to and from tagged CBOR
1616
objects.
1717

18-
* [com.upokecenter.cbor.CBOREncodeOptions](com.upokecenter.cbor.CBOREncodeOptions.md) -
19-
Specifies options for encoding and decoding CBOR objects.
18+
- [com.upokecenter.cbor.CBOREncodeOptions](com.upokecenter.cbor.CBOREncodeOptions.md) -
19+
Specifies options for encoding and decoding CBOR objects.
2020

21-
* [com.upokecenter.cbor.CBORNumber](com.upokecenter.cbor.CBORNumber.md) -
22-
An instance of a number that CBOR or certain CBOR tags can represent.
21+
- [com.upokecenter.cbor.CBORNumber](com.upokecenter.cbor.CBORNumber.md) -
22+
An instance of a number that CBOR or certain CBOR tags can represent.
2323

24-
* [com.upokecenter.cbor.CBORObject](com.upokecenter.cbor.CBORObject.md) -
25-
Represents an object in Concise Binary Object Representation (CBOR) and
26-
contains methods for reading and writing CBOR data.
24+
- [com.upokecenter.cbor.CBORObject](com.upokecenter.cbor.CBORObject.md) -
25+
Represents an object in Concise Binary Object Representation (CBOR) and
26+
contains methods for reading and writing CBOR data.
2727

28-
* [com.upokecenter.cbor.CBORTypeMapper](com.upokecenter.cbor.CBORTypeMapper.md) -
29-
Holds converters to customize the serialization and deserialization behavior
30-
of CBORObject.FromObject and CBORObject#ToObject, as
31-
well as type filters for ToObject.
28+
- [com.upokecenter.cbor.CBORTypeMapper](com.upokecenter.cbor.CBORTypeMapper.md) -
29+
Holds converters to customize the serialization and deserialization behavior
30+
of CBORObject.FromObject and CBORObject#ToObject, as
31+
well as type filters for ToObject.
3232

33-
* [com.upokecenter.cbor.JSONOptions](com.upokecenter.cbor.JSONOptions.md) -
34-
Includes options to control how CBOR objects are converted to JSON.
33+
- [com.upokecenter.cbor.JSONOptions](com.upokecenter.cbor.JSONOptions.md) -
34+
Includes options to control how CBOR objects are converted to JSON.
3535

36-
* [com.upokecenter.cbor.PODOptions](com.upokecenter.cbor.PODOptions.md) -
37-
Options for controlling how certain DotNET or Java objects, such as
36+
- [com.upokecenter.cbor.PODOptions](com.upokecenter.cbor.PODOptions.md) -
37+
Options for controlling how certain DotNET or Java objects, such as
3838
so-called "plain old data" objects (better known as POCOs in DotNET or
39-
POJOs in Java), are converted to CBOR objects.
39+
POJOs in Java), are converted to CBOR objects.
4040

41-
* [com.upokecenter.cbor.CBORDateConverter.ConversionType](com.upokecenter.cbor.CBORDateConverter.ConversionType.md) -
42-
Conversion type for date-time conversion.
41+
- [com.upokecenter.cbor.CBORDateConverter.ConversionType](com.upokecenter.cbor.CBORDateConverter.ConversionType.md) -
42+
Conversion type for date-time conversion.
4343

44-
* [com.upokecenter.cbor.CBORNumber.NumberKind](com.upokecenter.cbor.CBORNumber.NumberKind.md) -
45-
Specifies the underlying form of this CBOR number object.
44+
- [com.upokecenter.cbor.CBORNumber.NumberKind](com.upokecenter.cbor.CBORNumber.NumberKind.md) -
45+
Specifies the underlying form of this CBOR number object.
4646

47-
* [com.upokecenter.cbor.CBORType](com.upokecenter.cbor.CBORType.md) -
48-
Represents a type that a CBOR object can have.
47+
- [com.upokecenter.cbor.CBORType](com.upokecenter.cbor.CBORType.md) -
48+
Represents a type that a CBOR object can have.
4949

50-
* [com.upokecenter.cbor.JSONOptions.ConversionMode](com.upokecenter.cbor.JSONOptions.ConversionMode.md) -
51-
Specifies how JSON numbers are converted to CBOR objects when decoding JSON
52-
(such as via FromJSONString or ReadJSON).
50+
- [com.upokecenter.cbor.JSONOptions.ConversionMode](com.upokecenter.cbor.JSONOptions.ConversionMode.md) -
51+
Specifies how JSON numbers are converted to CBOR objects when decoding JSON
52+
(such as via FromJSONString or ReadJSON).
5353

54-
* [com.upokecenter.cbor.CBORException](com.upokecenter.cbor.CBORException.md) -
55-
Exception thrown for errors involving CBOR data.
54+
- [com.upokecenter.cbor.CBORException](com.upokecenter.cbor.CBORException.md) -
55+
Exception thrown for errors involving CBOR data.
5656

57-
* [com.upokecenter.util.DataUtilities](com.upokecenter.util.DataUtilities.md) -
58-
Contains methods useful for reading and writing text strings.
57+
- [com.upokecenter.util.DataUtilities](com.upokecenter.util.DataUtilities.md) -
58+
Contains methods useful for reading and writing text strings.

0 commit comments

Comments
 (0)