From 7978f85f7a9d40b59627ac44f72b619f94726ca1 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Tue, 23 May 2017 09:35:37 +0100 Subject: [PATCH] Add Pretty print option to JSON node and make XML and CSV nodes more consistent look and feel --- nodes/core/locales/en-US/messages.json | 8 +++++++- nodes/core/parsers/70-CSV.html | 22 ++++++++++----------- nodes/core/parsers/70-JSON.html | 11 +++++++++-- nodes/core/parsers/70-JSON.js | 3 ++- nodes/core/parsers/70-XML.html | 27 +++++--------------------- 5 files changed, 34 insertions(+), 37 deletions(-) diff --git a/nodes/core/locales/en-US/messages.json b/nodes/core/locales/en-US/messages.json index 5f2a2a75b..ea9cd07ba 100644 --- a/nodes/core/locales/en-US/messages.json +++ b/nodes/core/locales/en-US/messages.json @@ -643,6 +643,10 @@ "dropped-object": "Ignored non-object payload", "dropped": "Ignored unsupported payload type", "dropped-error": "Failed to convert payload" + }, + "label": { + "o2j": "Object-to-String options", + "pretty": "Pretty print JSON string" } }, "yaml": { @@ -656,7 +660,8 @@ "label": { "represent": "Represent XML tag attributes as a property named", "prefix": "Prefix to access character content", - "advanced": "Advanced options" + "advanced": "Advanced options", + "x2o": "XML-to-Object options" }, "tip": "There is no simple way to convert XML attributes to JSON so the approach taken here is to add a property, named $ by default, to the JSON structure.", "errors": { @@ -672,6 +677,7 @@ "type": "Type", "initpin": "Initialise pin state?", "debounce": "Debounce", + "freq": "Frequency", "button": "Button", "pimouse": "Pi Mouse", "pikeyboard": "Pi Keyboard", diff --git a/nodes/core/parsers/70-CSV.html b/nodes/core/parsers/70-CSV.html index 73f757303..373b9c81d 100644 --- a/nodes/core/parsers/70-CSV.html +++ b/nodes/core/parsers/70-CSV.html @@ -6,7 +6,7 @@
- @@ -15,7 +15,7 @@ - +
@@ -24,12 +24,12 @@

- - -
- +
- - diff --git a/nodes/core/parsers/70-JSON.html b/nodes/core/parsers/70-JSON.html index 1f4b00c4b..280ab21b7 100644 --- a/nodes/core/parsers/70-JSON.html +++ b/nodes/core/parsers/70-JSON.html @@ -4,6 +4,11 @@
+
+
+ + +