<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""> Is there any intrinsic function can convert string to map/json?</div><div class=""><br class=""></div><div class="">When I’m writing templates for senlin resources, I use following yaml:</div><div class=""><div class=""> profile:</div><div class=""> type: OS::Senlin::Profile</div><div class=""> properties:</div><div class=""> type: os.heat.stack-1.0</div><div class=""> properties:</div><div class=""> <font color="#ff2600" class=""> template: {get_file: server.yaml}</font></div></div><div class=""><br class=""></div><div class="">Here ‘template’ expect a json format, but get_file return a string. It would be good to find out a function that can translate string to json.</div><div class=""><br class=""></div><div class="">If we don’t have a function like that, I would be glad to add one, e.g. ‘str_json’ . So that I can use following yaml to create senlin profile resource:</div><div class=""><div class=""> profile:</div><div class=""> type: OS::Senlin::Profile</div><div class=""> properties:</div><div class=""> type: os.heat.stack-1.0</div><div class=""> properties:</div><div class=""> <font color="#ff2600" class=""> template: {str_json: {get_file: server.yaml}}</font></div></div><div class=""><font color="#ff2600" class=""><br class=""></font></div><div class=""><font color="#ff2600" class=""><br class=""></font></div><div class=""><font color="#ff2600" class=""><br class=""></font></div><div class=""><div class="">Best Regards,</div><div class="">Ethan Lynn</div><div class=""><a href="mailto:xuanlangjian@gmail.com" class="">xuanlangjian@gmail.com</a></div></div></body></html>