aJson is the attempt to port a complete JSON implementation to Arduino. It is based on the cJSON implementation, reduced in size and removing one or two feature. The current mbed implementation only supports FILE* as input so you will have to use a temporary file for parsing your json input. https://github.com/interactive-matter/aJson

Dependents:   WIZwikiREST20

Committer:
mimil
Date:
Tue Aug 28 08:16:29 2012 +0000
Revision:
1:6df1d1f1b372
Parent:
0:428cf9a51873
first release of aJSON library for mbed

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mimil 1:6df1d1f1b372 1 /*
mimil 1:6df1d1f1b372 2 * aJson
mimil 1:6df1d1f1b372 3 * stringbuffer.h
mimil 1:6df1d1f1b372 4 *
mimil 1:6df1d1f1b372 5 * http://interactive-matter.org/
mimil 1:6df1d1f1b372 6 *
mimil 1:6df1d1f1b372 7 * This file is part of aJson.
mimil 1:6df1d1f1b372 8 *
mimil 1:6df1d1f1b372 9 * aJson is free software: you can redistribute it and/or modify
mimil 1:6df1d1f1b372 10 * it under the terms of the GNU General Public License as published by
mimil 1:6df1d1f1b372 11 * the Free Software Foundation, either version 3 of the License, or
mimil 1:6df1d1f1b372 12 * (at your option) any later version.
mimil 1:6df1d1f1b372 13 *
mimil 1:6df1d1f1b372 14 * aJson is distributed in the hope that it will be useful,
mimil 1:6df1d1f1b372 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
mimil 1:6df1d1f1b372 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
mimil 1:6df1d1f1b372 17 * GNU General Public License for more details.
mimil 1:6df1d1f1b372 18 * You should have received a copy of the GNU General Public License
mimil 1:6df1d1f1b372 19 * along with aJson. If not, see <http://www.gnu.org/licenses/>.
mimil 1:6df1d1f1b372 20 *
mimil 1:6df1d1f1b372 21 * Created on: 14.10.2010
mimil 1:6df1d1f1b372 22 * Author: marcus
mimil 1:6df1d1f1b372 23 */
mimil 1:6df1d1f1b372 24
mimil 1:6df1d1f1b372 25 #ifndef STRINGBUFFER_H_
mimil 1:6df1d1f1b372 26 #define STRINGBUFFER_H_
mimil 1:6df1d1f1b372 27
mimil 1:6df1d1f1b372 28 typedef struct
mimil 1:6df1d1f1b372 29 {
mimil 1:6df1d1f1b372 30 char* string;
mimil 1:6df1d1f1b372 31 unsigned int memory;
mimil 1:6df1d1f1b372 32 unsigned int string_length;
mimil 1:6df1d1f1b372 33 } string_buffer;
mimil 1:6df1d1f1b372 34
mimil 1:6df1d1f1b372 35 #ifdef __cplusplus
mimil 1:6df1d1f1b372 36 extern "C"
mimil 1:6df1d1f1b372 37 {
mimil 1:6df1d1f1b372 38 #endif
mimil 1:6df1d1f1b372 39
mimil 1:6df1d1f1b372 40 string_buffer*
mimil 1:6df1d1f1b372 41 stringBufferCreate(void);
mimil 1:6df1d1f1b372 42
mimil 1:6df1d1f1b372 43 char
mimil 1:6df1d1f1b372 44 stringBufferAdd(char value, string_buffer* buffer);
mimil 1:6df1d1f1b372 45
mimil 1:6df1d1f1b372 46 char*
mimil 1:6df1d1f1b372 47 stringBufferToString(string_buffer* buffer);
mimil 1:6df1d1f1b372 48
mimil 1:6df1d1f1b372 49 void
mimil 1:6df1d1f1b372 50 stringBufferFree(string_buffer* buffer);
mimil 1:6df1d1f1b372 51
mimil 1:6df1d1f1b372 52 #ifdef __cplusplus
mimil 1:6df1d1f1b372 53 }
mimil 1:6df1d1f1b372 54 #endif
mimil 1:6df1d1f1b372 55 #endif /* STRINGBUFFER_H_ */