From 8613a49f6e239339a8596c9d34e922b09e7578e6 Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Thu, 16 Jul 2015 12:31:04 +0200 Subject: [PATCH] Import: Allow importing JSON arrays - "export" defaults to JSON array output now. Make "import" read it instead of throwing an error. --- ChangeLog | 1 + src/commands/CmdImport.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e6ff627ba..18b22c4f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -65,6 +65,7 @@ - The '_ids', '_projects', '_tags', '_uuids' helper commands are deprecated, and replaced by the new '_unique' helper command, which generates lists of unique values for the specified attribute. +- "import" can now import JSON arrays, the new default "export" output. ------ current release --------------------------- diff --git a/src/commands/CmdImport.cpp b/src/commands/CmdImport.cpp index 48c5e5770..f186af92f 100644 --- a/src/commands/CmdImport.cpp +++ b/src/commands/CmdImport.cpp @@ -101,7 +101,9 @@ int CmdImport::import (std::vector & lines) { std::string object = trimLeft ( trimRight ( - trim (line), + trimRight ( + trim (line), + ","), "]"), "[");