Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 462 Bytes

File metadata and controls

25 lines (18 loc) · 462 Bytes

cJSON for Chemical

cJSON bindings for Chemical.

Usage

import "chemicallang/cJSON"

Example

func main() : int {
    var root = cJSON::ffi::cJSON_CreateObject()
    cJSON::ffi::cJSON_AddItemToObject(root, "name", cJSON::ffi::cJSON_CreateString("Chemical"))
    
    var out = cJSON::ffi::cJSON_Print(root)
    std::print(out)
    
    cJSON::ffi::cJSON_Delete(root)
    cJSON::ffi::cJSON_free(out as *void)
    return 0
}