123456789101112131415161718192021(******************************************************************************)(* *)(* Copyright (c) 2026 Epure Team *)(* All rights reserved. *)(* *)(******************************************************************************)typejson_string_map=(string*string)listletjson_string_map_to_yojsonfields=`Assoc(List.map(fun(key,value)->(key,`Stringvalue))fields)letjson_string_map_of_yojson=function|`Assocfields->letrecloopacc=function|[]->Ok(List.revacc)|(key,`Stringvalue)::rest->loop((key,value)::acc)rest|(key,_)::_->Error(Printf.sprintf"expected string for %s"key)inloop[]fields|_->Error"expected JSON object"