2014-08-04 21:06:02 +02:00
|
|
|
|
This example demonstrates how you can use external libs in your application.
|
|
|
|
|
|
|
|
|
|
In this case we link against yajl (Yet Another JSON library) in order to
|
|
|
|
|
parse a JSON string that was POSTed to the server.
|
|
|
|
|
|
2016-01-27 21:32:57 +01:00
|
|
|
|
Take a peek at conf/build.conf for different build flavors and how to
|
|
|
|
|
link to other libraries.
|
|
|
|
|
|
2014-08-04 21:06:02 +02:00
|
|
|
|
Run:
|
|
|
|
|
```
|
2016-01-27 21:32:57 +01:00
|
|
|
|
$ kore run
|
2014-08-04 21:06:02 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Test:
|
|
|
|
|
```
|
2016-01-27 21:32:57 +01:00
|
|
|
|
$ curl -i -k -d '{"foo":{"bar": "Hello world"}}' https://127.0.0.1:8888
|
2014-08-04 21:06:02 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The result should echo back the foo.bar JSON path value: Hello world.
|
2014-08-04 21:06:35 +02:00
|
|
|
|
|
|
|
|
|
The yajl repo is available @ https://github.com/lloyd/yajl
|