# Automatically convert webtemplate .t.json to .opt format **Category:** [Archetype Designer](https://discourse.openehr.org/c/archetype-designer/30) **Created:** 2024-01-30 10:18 UTC **Views:** 428 **Replies:** 5 **URL:** https://discourse.openehr.org/t/automatically-convert-webtemplate-t-json-to-opt-format/4885 --- ## Post #1 by @Cartwright Hello, I have linked my GitHub account to Archetype Designer for better template versioning. Every time I save a new version of my template, a webtemplate ".t.json" is pushed to my GitHub repository. However, I need the .opt template format for later use and I want to avoid exporting the opt file manually from Archetype Designer for every new version. Is there a way to change the configuration in Archetype Designer. Or any available tool to convert .t.json to .opt template format? Thanks for your help --- ## Post #2 by @ian.mcnicoll Hi Kat, Right now, no - you need to export the .opt manually, unless you are a paid customer of Better with a local hosted version of AD where there is an option to upload the .opt directly to a CDR. I'd suggest that you probably don't want to export an .opt every time you change the t.json files - we would only recreate the .opt when there is a signifcant need e.g from update, api update. THere is a lot of modelling churn in AD that is probably best kept there and not always reflected in a new .opt. Having said that, I agree it would be nice to be able to generate new .opts and other export formats in bulk or as a more auomated process. --- ## Post #3 by @Cartwright Thank you for your answer Ian! I would expect that there might be an available open-source tool for doing such a conversion between template formats? I couldn't find much on GitHub repositories so far that could help. But thanks anyway! --- ## Post #4 by @ian.mcnicoll Both EhrBase and Better have open source code for converting .opt to webtemplates and example compositions but not for 'native json' to .opt --- ## Post #5 by @tstolker Hi iain, I am really struggling with how to translate .opt to webtemplate. Can you point me to the specific open source components being used? Thanks, Theo --- ## Post #6 by @SevKohler check here https://github.com/ehrbase/openEHR_SDK there is some marshal and unmarshal logic. --- **Canonical:** https://discourse.openehr.org/t/automatically-convert-webtemplate-t-json-to-opt-format/4885 **Original content:** https://discourse.openehr.org/t/automatically-convert-webtemplate-t-json-to-opt-format/4885