You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2017/03/01 00:14:20 UTC

[21/34] geode git commit: GEODE-2142: Adding JSON library from the https://github.com/tdunning/open-json project

http://git-wip-us.apache.org/repos/asf/geode/blob/b34e47ff/geode-json/src/test/java/org/json/ParsingTest.java
----------------------------------------------------------------------
diff --git a/geode-json/src/test/java/org/json/ParsingTest.java b/geode-json/src/test/java/org/json/ParsingTest.java
new file mode 100755
index 0000000..4a0837a
--- /dev/null
+++ b/geode-json/src/test/java/org/json/ParsingTest.java
@@ -0,0 +1,294 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.json;
+
+import org.junit.Test;
+
+import java.util.*;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+public class ParsingTest {
+
+    @Test
+    public void testParsingNoObjects() {
+        try {
+            new JSONTokener("").nextValue();
+            fail();
+        } catch (JSONException ignored) {
+        }
+    }
+
+    @Test
+    public void testParsingLiterals() throws JSONException {
+        assertParsed(Boolean.TRUE, "true");
+        assertParsed(Boolean.FALSE, "false");
+        assertParsed(JSONObject.NULL, "null");
+        assertParsed(JSONObject.NULL, "NULL");
+        assertParsed(Boolean.FALSE, "False");
+        assertParsed(Boolean.TRUE, "truE");
+    }
+
+    @Test
+    public void testParsingQuotedStrings() throws JSONException {
+        assertParsed("abc", "\"abc\"");
+        assertParsed("123", "\"123\"");
+        assertParsed("foo\nbar", "\"foo\\nbar\"");
+        assertParsed("foo bar", "\"foo\\u0020bar\"");
+        assertParsed("\"{}[]/\\:,=;#", "\"\\\"{}[]/\\\\:,=;#\"");
+    }
+
+    @Test
+    public void testParsingSingleQuotedStrings() throws JSONException {
+        assertParsed("abc", "'abc'");
+        assertParsed("123", "'123'");
+        assertParsed("foo\nbar", "'foo\\nbar'");
+        assertParsed("foo bar", "'foo\\u0020bar'");
+        assertParsed("\"{}[]/\\:,=;#", "'\\\"{}[]/\\\\:,=;#'");
+    }
+
+    @Test
+    public void testParsingUnquotedStrings() throws JSONException {
+        assertParsed("abc", "abc");
+        assertParsed("123abc", "123abc");
+        assertParsed("123e0x", "123e0x");
+        assertParsed("123e", "123e");
+        assertParsed("123ee21", "123ee21");
+        assertParsed("0xFFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFFF");
+    }
+
+    /**
+     * Unfortunately the original implementation attempts to figure out what
+     * Java number type best suits an input value.
+     */
+    @Test
+    public void testParsingNumbersThatAreBestRepresentedAsLongs() throws JSONException {
+        assertParsed(9223372036854775807L, "9223372036854775807");
+        assertParsed(9223372036854775806L, "9223372036854775806");
+        assertParsed(-9223372036854775808L, "-9223372036854775808");
+        assertParsed(-9223372036854775807L, "-9223372036854775807");
+    }
+
+    @Test
+    public void testParsingNumbersThatAreBestRepresentedAsIntegers() throws JSONException {
+        assertParsed(0, "0");
+        assertParsed(5, "5");
+        assertParsed(-2147483648, "-2147483648");
+        assertParsed(2147483647, "2147483647");
+    }
+
+    @Test
+    public void testParsingNegativeZero() throws JSONException {
+        assertParsed(0, "-0");
+    }
+
+    @Test
+    public void testParsingIntegersWithAdditionalPrecisionYieldDoubles() throws JSONException {
+        assertParsed(1d, "1.00");
+        assertParsed(1d, "1.0");
+        assertParsed(0d, "0.0");
+        assertParsed(-0d, "-0.0");
+    }
+
+    @Test
+    public void testParsingNumbersThatAreBestRepresentedAsDoubles() throws JSONException {
+        assertParsed(9.223372036854776E18, "9223372036854775808");
+        assertParsed(-9.223372036854776E18, "-9223372036854775809");
+        assertParsed(1.7976931348623157E308, "1.7976931348623157e308");
+        assertParsed(2.2250738585072014E-308, "2.2250738585072014E-308");
+        assertParsed(4.9E-324, "4.9E-324");
+        assertParsed(4.9E-324, "4.9e-324");
+    }
+
+    @Test
+    public void testParsingOctalNumbers() throws JSONException {
+        assertParsed(5, "05");
+        assertParsed(8, "010");
+        assertParsed(1046, "02026");
+    }
+
+    @Test
+    public void testParsingHexNumbers() throws JSONException {
+        assertParsed(5, "0x5");
+        assertParsed(16, "0x10");
+        assertParsed(8230, "0x2026");
+        assertParsed(180150010, "0xABCDEFA");
+        assertParsed(2077093803, "0x7BCDEFAB");
+    }
+
+    @Test
+    public void testParsingLargeHexValues() throws JSONException {
+        assertParsed(Integer.MAX_VALUE, "0x7FFFFFFF");
+        String message = "Hex values are parsed as Strings if their signed " +
+                "value is greater than Integer.MAX_VALUE.";
+        assertParsed(message, 0x80000000L, "0x80000000");
+    }
+
+    @Test
+    public void test64BitHexValues() throws JSONException {
+        // note that this is different from the same test in the original Android
+        // this is due to the fact that Long.parseLong doesn't correctly handle
+        // the value -1 expressed as unsigned hex if you use the normal JDK. Presumably
+        // the Android equivalent program does this better.
+        assertParsed("Large hex longs shouldn't yield ints or strings",
+                0xFFFFFFFFFFFFFFFL, "0xFFFFFFFFFFFFFFF");
+    }
+
+    @Test
+    public void testParsingWithCommentsAndWhitespace() throws JSONException {
+        assertParsed("baz", "  // foo bar \n baz");
+        assertParsed("baz", "  // foo bar \r baz");
+        assertParsed("baz", "  // foo bar \r\n baz");
+        assertParsed("baz", "  # foo bar \n baz");
+        assertParsed("baz", "  # foo bar \r baz");
+        assertParsed("baz", "  # foo bar \r\n baz");
+        assertParsed(5, "  /* foo bar \n baz */ 5");
+        assertParsed(5, "  /* foo bar \n baz */ 5 // quux");
+        assertParsed(5, "  5   ");
+        assertParsed(5, "  5  \r\n\t ");
+        assertParsed(5, "\r\n\t   5 ");
+    }
+
+    @Test
+    public void testParsingArrays() throws JSONException {
+        assertParsed(array(), "[]");
+        assertParsed(array(5, 6, true), "[5,6,true]");
+        assertParsed(array(5, 6, array()), "[5,6,[]]");
+        assertParsed(array(5, 6, 7), "[5;6;7]");
+        assertParsed(array(5, 6, 7), "[5  , 6 \t; \r\n 7\n]");
+        assertParsed(array(5, 6, 7, null), "[5,6,7,]");
+        assertParsed(array(null, null), "[,]");
+        assertParsed(array(5, null, null, null, 5), "[5,,,,5]");
+        assertParsed(array(null, 5), "[,5]");
+        assertParsed(array(null, null, null), "[,,]");
+        assertParsed(array(null, null, null, 5), "[,,,5]");
+    }
+
+    @Test
+    public void testParsingObjects() throws JSONException {
+        assertParsed(object("foo", 5), "{\"foo\": 5}");
+        assertParsed(object("foo", 5), "{foo: 5}");
+        assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\": 5, \"bar\": \"baz\"}");
+        assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\": 5; \"bar\": \"baz\"}");
+        assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\"= 5; \"bar\"= \"baz\"}");
+        assertParsed(object("foo", 5, "bar", "baz"), "{\"foo\"=> 5; \"bar\"=> \"baz\"}");
+        assertParsed(object("foo", object(), "bar", array()), "{\"foo\"=> {}; \"bar\"=> []}");
+        assertParsed(object("foo", object("foo", array(5, 6))), "{\"foo\": {\"foo\": [5, 6]}}");
+        assertParsed(object("foo", object("foo", array(5, 6))), "{\"foo\":\n\t{\t \"foo\":[5,\r6]}}");
+    }
+
+    @Test
+    public void testSyntaxProblemUnterminatedObject() {
+        assertParseFail("{");
+        assertParseFail("{\"foo\"");
+        assertParseFail("{\"foo\":");
+        assertParseFail("{\"foo\":bar");
+        assertParseFail("{\"foo\":bar,");
+        assertParseFail("{\"foo\":bar,\"baz\"");
+        assertParseFail("{\"foo\":bar,\"baz\":");
+        assertParseFail("{\"foo\":bar,\"baz\":true");
+        assertParseFail("{\"foo\":bar,\"baz\":true,");
+    }
+
+    @Test
+    public void testSyntaxProblemEmptyString() {
+        assertParseFail("");
+    }
+
+    @Test
+    public void testSyntaxProblemUnterminatedArray() {
+        assertParseFail("[");
+        assertParseFail("[,");
+        assertParseFail("[,,");
+        assertParseFail("[true");
+        assertParseFail("[true,");
+        assertParseFail("[true,,");
+    }
+
+    @Test
+    public void testSyntaxProblemMalformedObject() {
+        assertParseFail("{:}");
+        assertParseFail("{\"key\":}");
+        assertParseFail("{:true}");
+        assertParseFail("{\"key\":true:}");
+        assertParseFail("{null:true}");
+        assertParseFail("{true:true}");
+        assertParseFail("{0xFF:true}");
+    }
+
+    private void assertParseFail(String malformedJson) {
+        try {
+            new JSONTokener(malformedJson).nextValue();
+            fail("Successfully parsed: \"" + malformedJson + "\"");
+        } catch (JSONException ignored) {
+        } catch (StackOverflowError e) {
+            fail("Stack overflowed on input: \"" + malformedJson + "\"");
+        }
+    }
+
+    private JSONArray array(Object... elements) {
+        return new JSONArray(Arrays.asList(elements));
+    }
+
+    private JSONObject object(Object... keyValuePairs) throws JSONException {
+        JSONObject result = new JSONObject();
+        for (int i = 0; i < keyValuePairs.length; i += 2) {
+            result.put((String) keyValuePairs[i], keyValuePairs[i + 1]);
+        }
+        return result;
+    }
+
+    private void assertParsed(String message, Object expected, String json) throws JSONException {
+        Object actual = new JSONTokener(json).nextValue();
+        actual = canonicalize(actual);
+        expected = canonicalize(expected);
+        assertEquals("For input \"" + json + "\" " + message, expected, actual);
+    }
+
+    private void assertParsed(Object expected, String json) throws JSONException {
+        assertParsed("", expected, json);
+    }
+
+    /**
+     * Since they don't implement equals or hashCode properly, this recursively
+     * replaces JSONObjects with an equivalent HashMap, and JSONArrays with the
+     * equivalent ArrayList.
+     */
+    private Object canonicalize(Object input) throws JSONException {
+        if (input instanceof JSONArray) {
+            JSONArray array = (JSONArray) input;
+            List<Object> result = new ArrayList<Object>();
+            for (int i = 0; i < array.length(); i++) {
+                result.add(canonicalize(array.opt(i)));
+            }
+            return result;
+        } else if (input instanceof JSONObject) {
+            JSONObject object = (JSONObject) input;
+            Map<String, Object> result = new HashMap<String, Object>();
+            for (Iterator<?> i = object.keys(); i.hasNext(); ) {
+                String key = (String) i.next();
+                result.put(key, canonicalize(object.get(key)));
+            }
+            return result;
+        } else if (input == null || input.equals(JSONObject.NULL)) {
+            return JSONObject.NULL;
+        } else {
+            return input;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/b34e47ff/geode-json/src/test/java/org/json/SelfUseTest.java
----------------------------------------------------------------------
diff --git a/geode-json/src/test/java/org/json/SelfUseTest.java b/geode-json/src/test/java/org/json/SelfUseTest.java
new file mode 100755
index 0000000..0b9fb2c
--- /dev/null
+++ b/geode-json/src/test/java/org/json/SelfUseTest.java
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.json;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * These tests checks self use calls. For the most part we doesn't attempt to
+ * cover self-use, except in those cases where our clean room implementation
+ * does it.
+ * <p>
+ * <p>This black box test was written without inspecting the non-free org.json
+ * sourcecode.
+ */
+public class SelfUseTest {
+
+    private int objectPutCalls = 0;
+    private int objectGetCalls = 0;
+    private int objectOptCalls = 0;
+    private int objectOptTypeCalls = 0;
+    private int arrayPutCalls = 0;
+    private int arrayGetCalls = 0;
+    private int arrayOptCalls = 0;
+    private int arrayOptTypeCalls = 0;
+    private int tokenerNextCalls = 0;
+    private int tokenerNextValueCalls = 0;
+
+    private final JSONObject object = new JSONObject() {
+        @Override
+        public JSONObject put(String name, Object value) throws JSONException {
+            objectPutCalls++;
+            return super.put(name, value);
+        }
+
+        @Override
+        public Object get(String name) throws JSONException {
+            objectGetCalls++;
+            return super.get(name);
+        }
+
+        @Override
+        public Object opt(String name) {
+            objectOptCalls++;
+            return super.opt(name);
+        }
+
+        @Override
+        public boolean optBoolean(String key, boolean defaultValue) {
+            objectOptTypeCalls++;
+            return super.optBoolean(key, defaultValue);
+        }
+
+        @Override
+        public double optDouble(String key, double defaultValue) {
+            objectOptTypeCalls++;
+            return super.optDouble(key, defaultValue);
+        }
+
+        @Override
+        public int optInt(String key, int defaultValue) {
+            objectOptTypeCalls++;
+            return super.optInt(key, defaultValue);
+        }
+
+        @Override
+        public long optLong(String key, long defaultValue) {
+            objectOptTypeCalls++;
+            return super.optLong(key, defaultValue);
+        }
+
+        @Override
+        public String optString(String key, String defaultValue) {
+            objectOptTypeCalls++;
+            return super.optString(key, defaultValue);
+        }
+    };
+
+    private final JSONArray array = new JSONArray() {
+        @Override
+        public JSONArray put(int index, Object value) throws JSONException {
+            arrayPutCalls++;
+            return super.put(index, value);
+        }
+
+        @Override
+        public Object get(int index) throws JSONException {
+            arrayGetCalls++;
+            return super.get(index);
+        }
+
+        @Override
+        public Object opt(int index) {
+            arrayOptCalls++;
+            return super.opt(index);
+        }
+
+        @Override
+        public boolean optBoolean(int index, boolean fallback) {
+            arrayOptTypeCalls++;
+            return super.optBoolean(index, fallback);
+        }
+
+        @Override
+        public double optDouble(int index, double fallback) {
+            arrayOptTypeCalls++;
+            return super.optDouble(index, fallback);
+        }
+
+        @Override
+        public long optLong(int index, long fallback) {
+            arrayOptTypeCalls++;
+            return super.optLong(index, fallback);
+        }
+
+        @Override
+        public String optString(int index, String fallback) {
+            arrayOptTypeCalls++;
+            return super.optString(index, fallback);
+        }
+
+        @Override
+        public int optInt(int index, int fallback) {
+            arrayOptTypeCalls++;
+            return super.optInt(index, fallback);
+        }
+    };
+
+    private final JSONTokener tokener = new JSONTokener("{\"foo\": [true]}") {
+        @Override
+        public char next() {
+            tokenerNextCalls++;
+            return super.next();
+        }
+
+        @Override
+        public Object nextValue() throws JSONException {
+            tokenerNextValueCalls++;
+            return super.nextValue();
+        }
+    };
+
+
+    @Test
+    public void testObjectPut() throws JSONException {
+        object.putOpt("foo", "bar");
+        assertEquals(1, objectPutCalls);
+    }
+
+    @Test
+    public void testObjectAccumulate() throws JSONException {
+        object.accumulate("foo", "bar");
+        assertEquals(1, objectPutCalls);
+    }
+
+    @Test
+    public void testObjectGetBoolean() throws JSONException {
+        object.put("foo", "true");
+        object.getBoolean("foo");
+        assertEquals(1, objectGetCalls);
+    }
+
+    @Test
+    public void testObjectOptType() throws JSONException {
+        object.optBoolean("foo");
+        assertEquals(1, objectOptCalls);
+        assertEquals(1, objectOptTypeCalls);
+        object.optDouble("foo");
+        assertEquals(2, objectOptCalls);
+        assertEquals(2, objectOptTypeCalls);
+        object.optInt("foo");
+        assertEquals(3, objectOptCalls);
+        assertEquals(3, objectOptTypeCalls);
+        object.optLong("foo");
+        assertEquals(4, objectOptCalls);
+        assertEquals(4, objectOptTypeCalls);
+        object.optString("foo");
+        assertEquals(5, objectOptCalls);
+        assertEquals(5, objectOptTypeCalls);
+    }
+
+    @Test
+    public void testToJSONArray() throws JSONException {
+        object.put("foo", 5);
+        object.put("bar", 10);
+        array.put("foo");
+        array.put("baz");
+        array.put("bar");
+        object.toJSONArray(array);
+        assertEquals(3, arrayOptCalls);
+        assertEquals(0, arrayOptTypeCalls);
+        assertEquals(3, objectOptCalls);
+        assertEquals(0, objectOptTypeCalls);
+    }
+
+    @Test
+    public void testPutAtIndex() throws JSONException {
+        array.put(10, false);
+        assertEquals(1, arrayPutCalls);
+    }
+
+    @Test
+    public void testIsNull() {
+        array.isNull(5);
+        assertEquals(1, arrayOptCalls);
+    }
+
+    @Test
+    public void testArrayGetType() throws JSONException {
+        array.put(true);
+        array.getBoolean(0);
+        assertEquals(1, arrayGetCalls);
+    }
+
+    @Test
+    public void testArrayOptType() throws JSONException {
+        array.optBoolean(3);
+        assertEquals(1, arrayOptCalls);
+        assertEquals(1, arrayOptTypeCalls);
+        array.optDouble(3);
+        assertEquals(2, arrayOptCalls);
+        assertEquals(2, arrayOptTypeCalls);
+        array.optInt(3);
+        assertEquals(3, arrayOptCalls);
+        assertEquals(3, arrayOptTypeCalls);
+        array.optLong(3);
+        assertEquals(4, arrayOptCalls);
+        assertEquals(4, arrayOptTypeCalls);
+        array.optString(3);
+        assertEquals(5, arrayOptCalls);
+        assertEquals(5, arrayOptTypeCalls);
+    }
+
+    @Test
+    public void testToJSONObject() throws JSONException {
+        array.put("foo");
+        array.put("baz");
+        array.put("bar");
+        JSONArray values = new JSONArray();
+        values.put(5.5d);
+        values.put(11d);
+        values.put(30);
+        values.toJSONObject(array);
+        assertEquals(3, arrayOptCalls);
+        assertEquals(0, arrayOptTypeCalls);
+    }
+
+    @Test
+    public void testNextExpecting() throws JSONException {
+        tokener.next('{');
+        assertEquals(1, tokenerNextCalls);
+        tokener.next('\"');
+        assertEquals(2, tokenerNextCalls);
+    }
+
+    @Test
+    public void testNextValue() throws JSONException {
+        tokener.nextValue();
+        assertEquals(4, tokenerNextValueCalls);
+    }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/b34e47ff/geode-json/src/test/resources/sample-01.json
----------------------------------------------------------------------
diff --git a/geode-json/src/test/resources/sample-01.json b/geode-json/src/test/resources/sample-01.json
new file mode 100755
index 0000000..9cfef12
--- /dev/null
+++ b/geode-json/src/test/resources/sample-01.json
@@ -0,0 +1,227 @@
+[
+  {
+    "_id": "58309f3bd307b72ae49a9b23",
+    "index": 0,
+    "guid": "5764ebd8-b333-469e-8d83-4eb5658f1566",
+    "isActive": true,
+    "balance": "$1,099.93",
+    "picture": "http://placehold.it/32x32",
+    "age": 37,
+    "eyeColor": "blue",
+    "name": "Barrera Wilkerson",
+    "gender": "male",
+    "company": "VURBO",
+    "email": "barrerawilkerson@vurbo.com",
+    "phone": "+1 (817) 429-2473",
+    "address": "522 Vanderveer Street, Detroit, Wyoming, 4320",
+    "about": "Et officia aute ullamco magna adipisicing non ut cupidatat cupidatat aliquip. Tempor occaecat ex ad dolore aliquip mollit ea esse ipsum. Est incididunt sunt commodo duis est. Reprehenderit in ut reprehenderit ad culpa ea fugiat et est adipisicing aliquip. Id mollit voluptate qui pariatur officia.\r\n",
+    "registered": "2016-06-29T08:54:14 +07:00",
+    "latitude": -87.548434,
+    "longitude": 64.251242,
+    "tags": [
+      "aliqua",
+      "ex",
+      "sit",
+      "magna",
+      "dolor",
+      "laborum",
+      "non"
+    ],
+    "friends": [
+      {
+        "id": 0,
+        "name": "Byers Pratt"
+      },
+      {
+        "id": 1,
+        "name": "Kennedy Contreras"
+      },
+      {
+        "id": 2,
+        "name": "Frazier Monroe"
+      }
+    ],
+    "greeting": "Hello, Barrera Wilkerson! You have 3 unread messages.",
+    "favoriteFruit": "banana"
+  },
+  {
+    "_id": "58309f3b1f506440093a41d1",
+    "index": 1,
+    "guid": "de1a6cc9-f8b3-426e-b68a-cc30e1fff3c1",
+    "isActive": false,
+    "balance": "$3,397.60",
+    "picture": "http://placehold.it/32x32",
+    "age": 32,
+    "eyeColor": "blue",
+    "name": "Trisha Morris",
+    "gender": "female",
+    "company": "AMTAP",
+    "email": "trishamorris@amtap.com",
+    "phone": "+1 (805) 423-3375",
+    "address": "495 Tampa Court, Libertytown, New Hampshire, 5177",
+    "about": "Elit culpa Lorem dolor sit laborum ut ullamco ullamco nostrud reprehenderit adipisicing eiusmod. Aliqua quis dolor esse sint. Dolore in excepteur laborum anim ut consectetur. Nisi officia est eu ex ex id. Ipsum duis ullamco ad ut labore dolor. In amet tempor deserunt ullamco velit eu fugiat.\r\n",
+    "registered": "2015-02-08T06:14:19 +08:00",
+    "latitude": -81.956277,
+    "longitude": 143.685584,
+    "tags": [
+      "cillum",
+      "ullamco",
+      "magna",
+      "cillum",
+      "voluptate",
+      "magna",
+      "exercitation"
+    ],
+    "friends": [
+      {
+        "id": 0,
+        "name": "Fuentes Stout"
+      },
+      {
+        "id": 1,
+        "name": "Violet Vargas"
+      },
+      {
+        "id": 2,
+        "name": "Schmidt Wilder"
+      }
+    ],
+    "greeting": "Hello, Trisha Morris! You have 4 unread messages.",
+    "favoriteFruit": "strawberry"
+  },
+  {
+    "_id": "58309f3beaef2f31339b3755",
+    "index": 2,
+    "guid": "0bf387b7-abc2-4828-becc-1269928f7c3d",
+    "isActive": false,
+    "balance": "$1,520.64",
+    "picture": "http://placehold.it/32x32",
+    "age": 37,
+    "eyeColor": "blue",
+    "name": "Deanna Santiago",
+    "gender": "female",
+    "company": "MEGALL",
+    "email": "deannasantiago@megall.com",
+    "phone": "+1 (916) 511-2291",
+    "address": "919 Fayette Street, Homestead, Utah, 8669",
+    "about": "Sit amet ex quis velit irure Lorem non quis aliquip dolor pariatur nulla Lorem officia. Deserunt officia sit velit labore sint nostrud elit aliquip labore ullamco consectetur id amet. Ullamco duis commodo sit incididunt. Fugiat consectetur ad incididunt officia. Sint cillum minim laborum laboris id cillum est exercitation in eiusmod qui.\r\n",
+    "registered": "2015-11-18T08:39:28 +08:00",
+    "latitude": 79.105701,
+    "longitude": -146.901754,
+    "tags": [
+      "non",
+      "ullamco",
+      "cillum",
+      "ipsum",
+      "amet",
+      "aliqua",
+      "aliquip"
+    ],
+    "friends": [
+      {
+        "id": 0,
+        "name": "Hanson Anderson"
+      },
+      {
+        "id": 1,
+        "name": "Pollard Soto"
+      },
+      {
+        "id": 2,
+        "name": "Barlow Campbell"
+      }
+    ],
+    "greeting": "Hello, Deanna Santiago! You have 7 unread messages.",
+    "favoriteFruit": "apple"
+  },
+  {
+    "_id": "58309f3b49a68ad01346f27f",
+    "index": 3,
+    "guid": "d29c0dcc-48fb-4ca4-a63b-b47c0e6d6398",
+    "isActive": false,
+    "balance": "$2,069.96",
+    "picture": "http://placehold.it/32x32",
+    "age": 29,
+    "eyeColor": "green",
+    "name": "Brooks Gates",
+    "gender": "male",
+    "company": "TERRAGEN",
+    "email": "brooksgates@terragen.com",
+    "phone": "+1 (875) 483-2224",
+    "address": "562 Noll Street, Kipp, Louisiana, 7659",
+    "about": "Reprehenderit laboris mollit nulla commodo quis laborum commodo. Laborum aliquip laboris officia minim ipsum laborum ipsum reprehenderit quis laboris est sint culpa. Culpa magna aute mollit exercitation.\r\n",
+    "registered": "2016-05-04T10:34:38 +07:00",
+    "latitude": 72.77079,
+    "longitude": -134.291768,
+    "tags": [
+      "est",
+      "sunt",
+      "laboris",
+      "ea",
+      "proident",
+      "aute",
+      "excepteur"
+    ],
+    "friends": [
+      {
+        "id": 0,
+        "name": "Roxanne Morgan"
+      },
+      {
+        "id": 1,
+        "name": "Tamara Kelly"
+      },
+      {
+        "id": 2,
+        "name": "Cleveland Bush"
+      }
+    ],
+    "greeting": "Hello, Brooks Gates! You have 1 unread messages.",
+    "favoriteFruit": "banana"
+  },
+  {
+    "_id": "58309f3be746700e9af9a645",
+    "index": 4,
+    "guid": "54382bd6-c476-469d-9e1c-e546f959db51",
+    "isActive": true,
+    "balance": "$2,012.57",
+    "picture": "http://placehold.it/32x32",
+    "age": 40,
+    "eyeColor": "brown",
+    "name": "Jackie Thomas",
+    "gender": "female",
+    "company": "HINWAY",
+    "email": "jackiethomas@hinway.com",
+    "phone": "+1 (843) 470-2096",
+    "address": "910 Emerson Place, Gwynn, Federated States Of Micronesia, 4688",
+    "about": "Id cupidatat laboris elit est eiusmod esse nostrud. Ex commodo nisi voluptate est nisi laborum officia sint incididunt pariatur qui deserunt ullamco. Fugiat proident magna ipsum sit sint id adipisicing sit nostrud labore sit officia. Eiusmod exercitation non enim excepteur amet irure ullamco consectetur cupidatat proident Lorem reprehenderit aliquip. Veniam esse dolor Lorem incididunt proident officia enim in incididunt culpa. Mollit voluptate commodo aliquip anim ipsum nostrud ut labore enim labore qui do minim incididunt. Quis irure proident voluptate nisi qui sunt aute duis irure.\r\n",
+    "registered": "2014-08-03T09:21:43 +07:00",
+    "latitude": 84.871256,
+    "longitude": 2.043339,
+    "tags": [
+      "tempor",
+      "ut",
+      "deserunt",
+      "esse",
+      "nostrud",
+      "dolore",
+      "ex"
+    ],
+    "friends": [
+      {
+        "id": 0,
+        "name": "Lois Walters"
+      },
+      {
+        "id": 1,
+        "name": "Brewer Buchanan"
+      },
+      {
+        "id": 2,
+        "name": "Mccormick Fleming"
+      }
+    ],
+    "greeting": "Hello, Jackie Thomas! You have 2 unread messages.",
+    "favoriteFruit": "banana"
+  }
+]
\ No newline at end of file