4.8 KiB
4.8 KiB
Change Log
v1.4.1
- Add
v.At(...).Set(...)
pattern, allowing putting keys ahead (comparing tov.Set(...).At(...)
).
v1.4.0
- Allow passing parameter with a single slice or array for Get, Set, Append, Insert, Delete methods.
- Add GreaterThan, LessThan, GreaterThanOrEqual, LessThanOrEqual methods for number comparation.
v1.3.8
- Fix Issue #30
v1.3.7
- Fix Issue #29
v1.3.6
v1.3.5
- Fix Issue #26
v1.3.4
Release jsonvalue v1.3.4. Comparing to v1.3.3:
*jsonvalue.V
type now implements following interfaces thus it can used directly inencoding/json
:json.Marshaler
、json.Unmarshaler
encoding.BinaryMarshaler
、encoding.BinaryUnmarshaler
- Supports importing data types those implement
json.Marshaler
orencoding.TextMarshaler
interfaces, just likeencoding/json
does. - Add
MustAdd
,MustAppend
,MustInsert
,MustSet
,MustDelete
methods. These methods will not return sub-values or errors.- This will prevent golangci-lint warning of "return value is not used"
- Bug fix: When invoking
Append(xxx).InTheBeginning()
, the sub-value was actually and faulty append to the end. - Pre-allocate some buffer and space when marshaling and unmarshaling. It will speed-up a little bit and save 40% alloc count by average.
v1.3.3
Release jsonvalue v1.3.3. Comparing to v1.3.2:
- Release Engligh wiki.
- Fix #19 and #22.
v1.3.2
Release jsonvalue 1.3.2. Comparing to v1.3.1, #17 is fixed.
v1.3.1
Release jsonvalue 1.3.1. Comparing to v1.3.0:
- It is available to get key sequences of an unmarshaled object JSON
- Supporting marshal object by key sequence of when they are set.
- All invisible ASCII characters will be escaped in
\u00XX
format.
v1.3.0
Release v1.3.0. Comparing to v1.2.x:
- No longer escape % symbol by default.
- Add
Import
andExport
function to support conversion between Go standard types and jsonvalue. - Support generics-like operations in
Set, Append, Insert, Add, New
functions, which allows programmers to set any legal types without specifying types explicitly. - Add
OptIndent
to support indent in marshaling.
v1.2.1
Release v1.2.1. Comparing to v1.2.0:
- Support not escaping slash symbol / in marshaling. Please refer to
OptEscapeSlash
function. - Support not escaping several HTML symbols in marshaling (issue #13). Please refer to OptEscapeHTML function.
- Support not escaping unicodes greater than
\u00FF
in marshaling. Please refer to OptUTF8 function. - Support children-auto-generating in
Append(...).InTheBeginning()
andAppend(...).InTheEnd()
. But keep in mind that Insert operations remains not doing that. - You can override default marshaling options from now on. Please refer to
SetDefaultMarshalOptions
function.
Other changes:
- Instead of Travis-CI, I will use Github Actions in order to generate go test reports from now on.
v1.2.0
Release v1.2.0, comparing to v1.1.1:
- Fix the bug that float-pointed numbers with scientific notation format are not supported. (issue #8)
- Add detailed wiki written in simplified Chinese. If you need English one, please leave me an issue.
- Deprecate
Opt{}
for additional options, and replace withOptXxx()
functions. - A first non-forward-compatible feature is released: Parameter formats for
NewFloat64
andNewFloat32
is changed.- If you want to specify format of float-pointed numbers, please use
NewFloat64f
andNewFloat32f
instead.
- If you want to specify format of float-pointed numbers, please use
- Add
ForRangeArr
andForRangeObj
functions, deprecatingIterArray
andIterObject
. - Support
SetEscapeHTML
. (issue11) - Support converting number to legal JSON data when they are
+/-NaN
and+/-Inf
.
v1.1.1
Release v1.1.1, comparing to v1.1.0:
- All functions will NOT return nil
*jsonvalue.V
object instead of an instance withNotExist
type when error occurs.- Therefore, programmers can use the returned instance for shorter operations.
- Supports
MustGet()
function, without error returning. - Supports
String()
forValueType
type