2026-03-16 10:35:43 +00:00
|
|
|
#include <fx/serial.h>
|
2025-09-22 10:55:20 +01:00
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
|
{
|
2026-03-16 10:35:43 +00:00
|
|
|
fx_stream *src = fx_stdin;
|
|
|
|
|
fx_stream *dest = fx_stdout;
|
2025-09-22 10:55:20 +01:00
|
|
|
|
|
|
|
|
#if 0
|
2026-03-16 10:35:43 +00:00
|
|
|
fx_serial_ctx *ctx;
|
|
|
|
|
fx_serial_ctx_create(&ctx);
|
2025-09-22 10:55:20 +01:00
|
|
|
|
2026-03-16 10:35:43 +00:00
|
|
|
fx_object *data;
|
|
|
|
|
fx_status status = fx_serial_ctx_deserialise(
|
|
|
|
|
ctx, FX_SERIAL_FORMAT_JSON, src, &data, 0);
|
|
|
|
|
if (!FX_OK(status)) {
|
2025-09-22 10:55:20 +01:00
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 10:35:43 +00:00
|
|
|
fx_to_string(FX_OBJECT(data), dest);
|
|
|
|
|
fx_stream_write_char(fx_stdout, '\n');
|
2025-09-22 10:55:20 +01:00
|
|
|
|
2026-03-16 10:35:43 +00:00
|
|
|
fx_release(data);
|
|
|
|
|
fx_serial_ctx_destroy(ctx);
|
2025-09-22 10:55:20 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|