@Test
    void testContentToInspectorMapping() {
        Inspector value1 = new JSONString("").inspect();
        Inspector value2 = new JSONString("foo").inspect();
        Inspector value3 = new JSONString("\"foo\"").inspect();
        Inspector value4 = new JSONString("123").inspect();
        Inspector value5 = new JSONString("{\"foo\":1}").inspect();
        Inspector value6 = new JSONString("[1,2,3]").inspect();

        assertEquals(Type.STRING, value1.type());
        assertEquals("", value1.asString());

        assertEquals(value2.type(), Type.STRING);
        assertEquals("foo", value2.asString());

        assertEquals(value3.type(), Type.STRING);
        assertEquals("\"foo\"", value3.asString());

        assertEquals(value4.type(), Type.STRING);
        assertEquals("123", value4.asString());

        assertEquals(value5.type(), Type.OBJECT);
        assertEquals(1L, value5.field("foo").asLong());
        assertEquals("{\"foo\":1}", value5.toString());

        assertEquals(value6.type(), Type.ARRAY);
        assertEquals(1L, value6.entry(0).asLong());
        assertEquals(2L, value6.entry(1).asLong());
        assertEquals(3L, value6.entry(2).asLong());
        assertEquals("[1,2,3]", value6.toString());
    }
and here is some corresponding XML
     
          <item>
          <struct-field name="asf">here is 1st simple string field</struct-field>
          <struct-field name="map">
          <item><key>one key string</key><value>
          <item>one value string</item>
          <item>embedded array</item>
          </value></item>
          <item><key>two key string</key><value>
          <item>two value string</item>
          <item>embedded array</item>
          </value></item>
          </struct-field>
          <struct-field name="sf2">here is 2nd simple string field</struct-field>
          </item>
          <item>
          <struct-field name="asf">here is 3rd simple string field</struct-field>
          <struct-field name="map">
          <item><key>three key string</key><value>
          <item>three value string</item>
          <item>embedded array</item>
          </value></item>
          <item><key>four key string</key><value>
          <item>four value string</item>
          <item>embedded array</item>
          </value></item>
          </struct-field>
          <struct-field name="sf2">here is 4th simple string field</struct-field>
          </item>
*
container-search/src/test/java/com/yahoo/prelude/hitfield/test/JSONStringTestCase.java