tree: 77aa37c662cad572283300481cf0662ad366cc19 [path history] [tgz]
  1. .gitignore
  3. cjson_generated_bindings.dart
  4. example.json
  5. main.dart
  6. pubspec.yaml

cJson example

Demonstrates generation of bindings for a C library called cJson and then using these bindings to parse some json.

Building the cJson dynamic library

From the root of this repository -

cd third_party/cjson_library
cmake .

Generating bindings

At the root of this example (example/c_json), run -

dart run ffigen

This will generate bindings in a file: cjson_generated_bindings.dart

Running the example

dart main.dart