summaryrefslogtreecommitdiff
path: root/apps/netutils/json
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-04-13 16:24:28 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-04-13 16:24:28 -0600
commit43ec94a665e13552402ff4f102e0f65f6792cf29 (patch)
tree05da26d1bb5e364c1a388afd54630d5ae3ca4aa7 /apps/netutils/json
parent70b6bb22af51defd713adfd452309f32f0e523aa (diff)
downloadnuttx-43ec94a665e13552402ff4f102e0f65f6792cf29.tar.gz
nuttx-43ec94a665e13552402ff4f102e0f65f6792cf29.tar.bz2
nuttx-43ec94a665e13552402ff4f102e0f65f6792cf29.zip
More trailing whilespace removal
Diffstat (limited to 'apps/netutils/json')
-rw-r--r--apps/netutils/json/Makefile2
-rw-r--r--apps/netutils/json/README18
-rw-r--r--apps/netutils/json/cJSON.c12
3 files changed, 16 insertions, 16 deletions
diff --git a/apps/netutils/json/Makefile b/apps/netutils/json/Makefile
index b818ede81..17eb55e71 100644
--- a/apps/netutils/json/Makefile
+++ b/apps/netutils/json/Makefile
@@ -60,7 +60,7 @@ ROOTDEPPATH = --dep-path .
# Common build
-VPATH =
+VPATH =
all: .built
.PHONY: context depend clean distclean
diff --git a/apps/netutils/json/README b/apps/netutils/json/README
index 6d60da934..058644f52 100644
--- a/apps/netutils/json/README
+++ b/apps/netutils/json/README
@@ -66,12 +66,12 @@ philosophy as JSON itself. Simple, dumb, out of the way.
Some JSON:
{
- "name": "Jack (\"Bee\") Nimble",
+ "name": "Jack (\"Bee\") Nimble",
"format": {
- "type": "rect",
- "width": 1920,
- "height": 1080,
- "interlace": false,
+ "type": "rect",
+ "width": 1920,
+ "height": 1080,
+ "interlace": false,
"frame rate": 24
}
}
@@ -99,7 +99,7 @@ Finished? Delete the root (this takes care of everything else).
That's AUTO mode. If you're going to use Auto mode, you really ought to check pointers
before you dereference them. If you want to see how you'd build this struct in code?
cJSON *root,*fmt;
- root=cJSON_CreateObject();
+ root=cJSON_CreateObject();
cJSON_AddItemToObject(root, "name", cJSON_CreateString("Jack (\"Bee\") Nimble"));
cJSON_AddItemToObject(root, "format", fmt=cJSON_CreateObject());
cJSON_AddStringToObject(fmt,"type", "rect");
@@ -198,7 +198,7 @@ void parse_object(cJSON *item)
int i; for (i=0;i<cJSON_GetArraySize(item);i++)
{
cJSON *subitem=cJSON_GetArrayItem(item,i);
- // handle subitem.
+ // handle subitem.
}
}
@@ -211,7 +211,7 @@ void parse_object(cJSON *item)
{
// handle subitem
if (subitem->child) parse_object(subitem->child);
-
+
subitem=subitem->next;
}
}
@@ -240,7 +240,7 @@ cJSON *Create_array_of_anything(cJSON **items,int num)
}
return root;
}
-
+
and simply: Create_array_of_anything(objects,24);
cJSON doesn't make any assumptions about what order you create things in.
diff --git a/apps/netutils/json/cJSON.c b/apps/netutils/json/cJSON.c
index e5120ec42..322b30869 100644
--- a/apps/netutils/json/cJSON.c
+++ b/apps/netutils/json/cJSON.c
@@ -52,7 +52,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
-
+
static const char *ep;
static const unsigned char firstByteMark[7] =
@@ -75,7 +75,7 @@ static char *print_object(cJSON *item, int depth, int fmt);
/****************************************************************************
* Private Functions
****************************************************************************/
-
+
static char *cJSON_strdup(const char *str)
{
size_t len;
@@ -168,7 +168,7 @@ static const char *parse_number(cJSON *item, const char *num)
do
{
n = (n * 10.0) + (*num++ - '0'), scale--;
- }
+ }
while (*num >= '0' && *num <= '9');
}
@@ -652,7 +652,7 @@ static const char *parse_array(cJSON *item, const char *value)
/* Skip any spacing, get the value. */
- value = skip(parse_value(child, skip(value)));
+ value = skip(parse_value(child, skip(value)));
if (!value)
{
return 0;
@@ -845,7 +845,7 @@ static const char *parse_object(cJSON *item, const char *value)
/* Skip any spacing, get the value. */
- value = skip(parse_value(child, skip(value + 1)));
+ value = skip(parse_value(child, skip(value + 1)));
if (!value)
{
return 0;
@@ -1089,7 +1089,7 @@ static cJSON *create_reference(cJSON *item)
/****************************************************************************
* Public Functions
****************************************************************************/
-
+
const char *cJSON_GetErrorPtr(void)
{
return ep;