Skip to main content

pio_to_json

Function pio_to_json 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pio_to_json( net: *const PioNetwork, errbuf: *mut c_char, errlen: usize, ) -> *mut c_char
Expand description

Serialize the case to JSON: the structured-table transport every Julia bridge consumes. Carries the whole [Network] (buses, loads, shunts, branches, generators, storage, HVDC, extras) but not the retained source text, so it is structured data, not the byte-exact echo. Returns an owned C string (free with pio_string_free), NULL on error (message into errbuf).