user49981, я читал это, но там пример когда один обьект, а меня получается коллекция, типа массив, наверное serializer обернуть в цикл, сначала выполнив json_decode.
Ругается на this, на скобки, doc.crossplatform.ru/qt/4.5.0/qnetworkaccessmanager.html , вот пример, такое чувство что чего-то не хватает, может это очевидно, но я новичек в с++
mips-openwrt-linux-musl-gcc -Wall libwps.c -c
cc1: note: someone does not honour COPTS correctly, passed 0 times
In file included from libwps.c:14:0:
libwps.h:50:1: error: unknown type name 'u_char'
int parse_wps_parameters(const u_char *packet, size_t len, struct libwps_data *wps);
^
libwps.h:129:1: error: unknown type name 'u_char'
int parse_wps_tag(const u_char *tags, size_t len, struct libwps_data *wps);
^
libwps.h:130:1: error: unknown type name 'u_char'
unsigned char *get_wps_data(const u_char *data, size_t len, size_t *tag_len);
^
libwps.h:131:1: error: unknown type name 'u_char'
unsigned char *get_wps_data_element(const u_char *data, size_t len, uint16_t type, size_t *el_len);
^
libwps.h:132:1: error: unknown type name 'u_char'
int libwps_has_rt_header(const u_char *packet, size_t len);
^
libwps.h:133:1: error: unknown type name 'u_char'
const u_char *libwps_radio_header(const u_char *packet, size_t len);
^
libwps.h:133:1: error: unknown type name 'u_char'
libwps.c:26:1: error: unknown type name 'u_char'
int parse_wps_parameters(const u_char *packet, size_t len, struct libwps_data *wps)
^
libwps.c: In function 'parse_wps_parameters':
libwps.c:28:5: error: unknown type name 'u_char'
const u_char *data = NULL;
^
libwps.c:29:12: warning: variable 'data_len' set but not used [-Wunused-but-set-variable]
size_t data_len = 0, offset = 0;
^
libwps.c: At top level:
libwps.c:55:1: error: unknown type name 'u_char'
int parse_wps_tag(const u_char *tags, size_t len, struct libwps_data *wps)
^
libwps.c: In function 'parse_wps_tag':
libwps.c:89:13: warning: passing argument 1 of 'get_wps_data_element' from incompatible pointer type [enabled by default]
el = get_wps_data_element(wps_ie_data, wps_data_len, elements[i], &el_len);
^
In file included from libwps.c:14:0:
libwps.h:131:16: note: expected 'const int *' but argument is of type 'unsigned char *'
unsigned char *get_wps_data_element(const u_char *data, size_t len, uint16_t type, size_t *el_len);
^
libwps.c: At top level:
libwps.c:190:1: error: unknown type name 'u_char'
unsigned char *get_wps_data(const u_char *data, size_t len, size_t *tag_len)
^
libwps.c:234:1: error: unknown type name 'u_char'
unsigned char *get_wps_data_element(const u_char *data, size_t len, uint16_t type, size_t *el_len)
^
libwps.c:269:1: error: unknown type name 'u_char'
int libwps_has_rt_header(const u_char *packet, size_t len)
^
libwps.c:291:1: error: unknown type name 'u_char'
const u_char *libwps_radio_header(const u_char *packet, size_t len)
^
libwps.c:291:1: error: unknown type name 'u_char'
libwps.c: In function 'libwps_radio_header':
libwps.c:299:17: error: 'u_char' undeclared (first use in this function)
return (u_char *) FAKE_RADIO_TAP_HEADER;
^
libwps.c:299:17: note: each undeclared identifier is reported only once for each function it appears in
libwps.c:299:25: error: expected expression before ')' token
return (u_char *) FAKE_RADIO_TAP_HEADER;
^
libwps.c:302:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:5: recipe for target 'libwps.o' failed
make[5]: *** [libwps.o] Error 1
make[5]: Leaving directory '/home/maks/trunk/build_dir/target-mips_34kc_musl-1.1.11/reaver-wps-fork-t6x-Big_endian/src/libwps'
Makefile:19: recipe for target 'libwps.o' failed
make[4]: *** [libwps.o] Error 2
make[4]: Leaving directory '/home/maks/trunk/build_dir/target-mips_34kc_musl-1.1.11/reaver-wps-fork-t6x-Big_endian/src'
Makefile:54: recipe for target '/home/maks/trunk/build_dir/target-mips_34kc_musl-1.1.11/reaver-wps-fork-t6x-Big_endian/.built' failed
make[3]: *** [/home/maks/trunk/build_dir/target-mips_34kc_musl-1.1.11/reaver-wps-fork-t6x-Big_endian/.built] Error 2
make[3]: Leaving directory '/home/maks/trunk/feeds/packages/net/reaver'
package/Makefile:191: recipe for target 'package/feeds/packages/reaver/compile' failed
make[2]: *** [package/feeds/packages/reaver/compile] Error 2
make[2]: Leaving directory '/home/maks/trunk'
package/Makefile:188: recipe for target '/home/maks/trunk/staging_dir/target-mips_34kc_musl-1.1.11/stamp/.package_compile' failed
make[1]: *** [/home/maks/trunk/staging_dir/target-mips_34kc_musl-1.1.11/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/maks/trunk'
/home/maks/trunk/include/toplevel.mk:177: ошибка выполнения рецепта для цели «world»
make: *** [world] Ошибка 2