Change Log
- Add
v.At(...).Set(...)
pattern, allowing putting keys ahead (comparing tov.Set(...).At(...)
).
- 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.
- Fix Issue #30
- Fix Issue #29
- Fix Issue #26
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.
Release jsonvalue v1.3.3. Comparing to v1.3.2:
- Release Engligh wiki.
- Fix #19 and #22.
Release jsonvalue 1.3.2. Comparing to v1.3.1, #17 is fixed.
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.
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.
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.
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
.
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