diff --git a/CHANGELOG.md b/CHANGELOG.md
index 23afc87..d2b045e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Change Log
+## Version 1.15.2
+
+Released on June 13, 2021
+
+- Allow empty key names in JSON output. ([GitHub #57](https://github.com/mithrandie/csvq/issues/57))
+- Fix a bug of the "--allow-uneven-fields" option. ([GitHub #59](https://github.com/mithrandie/csvq/issues/59))
+
## Version 1.15.1
Released on May 5, 2021
diff --git a/docs/changelog.md b/docs/changelog.md
index 03d99a3..6219d98 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -5,6 +5,13 @@ title: Change Log - csvq
# Change Log
+## Version 1.15.2
+
+Released on June 13, 2021
+
+- Allow empty key names in JSON output. ([GitHub #57](https://github.com/mithrandie/csvq/issues/57))
+- Fix a bug of the "--allow-uneven-fields" option. ([GitHub #59](https://github.com/mithrandie/csvq/issues/59))
+
## Version 1.15.1
Released on May 5, 2021
diff --git a/docs/index.md b/docs/index.md
index 9b60b01..0eb981e 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -13,10 +13,10 @@ In the multiple operations, you can use variables, cursors, temporary tables, an
## Latest Release
-Version 1.15.1
-: Released on May 5, 2021
+Version 1.15.2
+: Released on June 13, 2021
-
+
file_downloaddownload
diff --git a/docs/sitemap.xml b/docs/sitemap.xml
index 051ebab..25af5ca 100644
--- a/docs/sitemap.xml
+++ b/docs/sitemap.xml
@@ -6,7 +6,7 @@
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
https://mithrandie.github.io/csvq/
- 2021-05-05T00:06:28+00:00
+ 2021-06-13T14:02:24+00:00
https://mithrandie.github.io/csvq/reference.html
@@ -178,7 +178,7 @@
https://mithrandie.github.io/csvq/changelog.html
- 2021-05-05T00:06:28+00:00
+ 2021-06-13T14:02:24+00:00
https://mithrandie.github.io/csvq/license.html
diff --git a/go.mod b/go.mod
index b50163e..306db36 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/mithrandie/csvq
require (
github.com/mitchellh/go-homedir v1.0.0
github.com/mithrandie/go-file/v2 v2.0.2
- github.com/mithrandie/go-text v1.4.0
+ github.com/mithrandie/go-text v1.4.1
github.com/mithrandie/readline-csvq v1.1.1
github.com/mithrandie/ternary v1.1.0
github.com/urfave/cli v1.20.0
diff --git a/go.sum b/go.sum
index 140e4dc..27f24c0 100644
--- a/go.sum
+++ b/go.sum
@@ -2,8 +2,8 @@ github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnG
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mithrandie/go-file/v2 v2.0.2 h1:3/yzItlTssDX9wOZrj9MtRyXbr52OZURmXFMuvpJ6Fg=
github.com/mithrandie/go-file/v2 v2.0.2/go.mod h1:98a9loPjYr7ffsfwMDdJ7iH/dO8EXAca8XiI6SZpPV8=
-github.com/mithrandie/go-text v1.4.0 h1:hK2i8ydiM3Uc5UqaY/aNz9ztdlNT8RvBJnJLIOX+tUM=
-github.com/mithrandie/go-text v1.4.0/go.mod h1:Ivtyn3cuJYAs2UpihWmnY1KAixmLonELJ454EOZGzDg=
+github.com/mithrandie/go-text v1.4.1 h1:tLIMamsVRYKsDTIDu7hZifOA4gtwSUln1zrZ9GM0eTU=
+github.com/mithrandie/go-text v1.4.1/go.mod h1:Ivtyn3cuJYAs2UpihWmnY1KAixmLonELJ454EOZGzDg=
github.com/mithrandie/readline-csvq v1.1.1 h1:kp9W5WPUAB+NOgW5axPdu8mZe1M9CP/D1xpabj39JVY=
github.com/mithrandie/readline-csvq v1.1.1/go.mod h1:eOJt0j6UI9lhwM/KP+v40ugarhXsnPIXStvkfIaq79E=
github.com/mithrandie/ternary v1.1.0 h1:BlN8EoTsIYjhuWkfXHrh7+G+/Y0VvvWGVVldyjNH2VU=
diff --git a/lib/json/cache.go b/lib/json/cache.go
index 64ca4c1..61500d3 100644
--- a/lib/json/cache.go
+++ b/lib/json/cache.go
@@ -34,9 +34,6 @@ func (pmap PathMap) load(key string) (PathExpression, bool) {
func (pmap PathMap) Parse(s string) (PathExpression, error) {
s = strings.TrimSpace(s)
- if len(s) < 1 {
- return nil, nil
- }
if e, ok := pmap.load(s); ok {
return e, nil
diff --git a/lib/json/conversion_test.go b/lib/json/conversion_test.go
index a5a9945..72c59e6 100644
--- a/lib/json/conversion_test.go
+++ b/lib/json/conversion_test.go
@@ -407,6 +407,48 @@ var convertTableValueToJsonStructureTests = []struct {
},
},
},
+ {
+ Fields: []string{
+ "column1",
+ "",
+ },
+ Rows: [][]value.Primary{
+ {
+ value.NewString("a"),
+ value.NewInteger(1),
+ },
+ {
+ value.NewString("b"),
+ value.NewFloat(0.2),
+ },
+ },
+ Expect: json.Array{
+ json.Object{
+ Members: []json.ObjectMember{
+ {
+ Key: "column1",
+ Value: json.String("a"),
+ },
+ {
+ Key: "",
+ Value: json.Integer(1),
+ },
+ },
+ },
+ json.Object{
+ Members: []json.ObjectMember{
+ {
+ Key: "column1",
+ Value: json.String("b"),
+ },
+ {
+ Key: "",
+ Value: json.Float(0.2),
+ },
+ },
+ },
+ },
+ },
{
Fields: []string{
"column1",
diff --git a/lib/query/version.go b/lib/query/version.go
index 07b8a0a..ddd3302 100644
--- a/lib/query/version.go
+++ b/lib/query/version.go
@@ -1,3 +1,3 @@
package query
-var Version = "v1.15.1"
+var Version = "v1.15.2"