text: /*
   Parson ( http://kgabis.github.com/parson/ )
   Copyright (c) 2012 - 2017 Krzysztof Gabis
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:
   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   THE SOFTWARE.
  
   Adding to above information, we modify this parson.c code for our purpose.
   This modified code is from the parson.c code and parson.h code. 
   If you want to use, copy, modify, merge, publish, distribute, sublicense, and/or sell this code,we would be very grateful.
   greeenux and whisi are our member. Please contact us, if you have anything to fix or revise.
  */
  
  #ifdef _MSC_VER
  #ifndef _CRT_SECURE_NO_WARNINGS
  #define _CRT_SECURE_NO_WARNINGS
  #endif /* _CRT_SECURE_NO_WARNINGS */
  #endif /* _MSC_VER */
  
  #include "parson.h"
  #include "type_definitions.h"
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include <ctype.h>
  #include <math.h>
  #include <errno.h>
  
  
  /* JSON Array API */
  JSON_Value * json_array_get_value(const JSON_Array *array, size_t index) {
      if (array == NULL || index >= json_array_get_count(array)) {
          return NULL;
      }
      return array->items[index];
  }
  
  const char * json_array_get_string(const JSON_Array *array, size_t index) {
      return json_value_get_string(json_array_get_value(array, index));
  }
  
  double json_array_get_number(const JSON_Array *array, size_t index) {
      return json_value_get_number(json_array_get_value(array, index));
  }
  
  JSON_Object * json_array_get_object(const JSON_Array *array, size_t index) {
      return json_value_get_object(json_array_get_value(array, index));
  }
  
  JSON_Array * json_array_get_array(const JSON_Array *array, size_t index) {
      return json_value_get_array(json_array_get_value(array, index));
  }
  
  int json_array_get_boolean(const JSON_Array *array, size_t index) {
      return json_value_get_boolean(json_array_get_value(array, index));
  }
  
  size_t json_array_get_count(const JSON_Array *array) {
      return array ? array->count : 0;
  }
  
  JSON_Value * json_array_get_wrapping_value(const JSON_Array *array) {
      return array->wrapping_value;
  }
  