45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
/**
|
|
rjp
|
|
Copyright (C) 2018 rexy712
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef RJP_INTERNAL_H
|
|
#define RJP_INTERNAL_H
|
|
|
|
#include "rjp.h"
|
|
|
|
//
|
|
typedef struct RJP_array_element{
|
|
struct RJP_value value;
|
|
struct RJP_array_element* next;
|
|
}RJP_array_element;
|
|
//A member of an object
|
|
typedef struct RJP_object_member{
|
|
struct RJP_value value;
|
|
struct RJP_string name;
|
|
struct RJP_object_member* next;
|
|
}RJP_object_member;
|
|
|
|
char* _rjp__parse_string(RJP_value* root, const char* str, int* len, int* row, int* column);
|
|
size_t _rjp__object_strlen(RJP_value* root);
|
|
void _rjp__add_member(RJP_object* j, const char* str, size_t len);
|
|
void _rjp__add_member_no_alloc(RJP_object* j, char* str, size_t len);
|
|
void _rjp__add_element(RJP_array* j);
|
|
size_t _rjp__object_strlen(RJP_value* root);
|
|
size_t _rjp__value_strlen(RJP_value* root);
|
|
|
|
#endif
|