# Mesh.from\_json()

**URL:** <https://forum.compas-framework.org/t/mesh-from-json/348>\
**Category:** compas\
**Created:** [June 18, 2020, 10:28am UTC](https://forum.compas-framework.org/t/mesh-from-json/348 "2020-06-18T10:28:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SalMo](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@SalMo](https://forum.compas-framework.org/u/SalMo)\
**Post date:** [June 18, 2020, 10:28am UTC](https://forum.compas-framework.org/t/mesh-from-json/348/1 "2020-06-18T10:28:29Z")

</div>

I have used Mesh.from\_json() for a long time. Today strangely it gives me the following error:

> Message: malformed string
> 
> Traceback:  
> line 79, in \_convert, “C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\ast.py”  
> line 80, in literal\_eval, “C:\Program Files\Rhino 6\Plug-ins\IronPython\Lib\ast.py”  
> line 302, in data, “C:\Users\msalma\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\datastructures\mesh\core\halfedge.py”  
> line 376, in from\_json, “C:\Users\msalma\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas\datastructures\mesh\core\halfedge.py”

---

<div class="post-metadata">

**Author:** ![arpastrana](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@arpastrana](https://forum.compas-framework.org/u/arpastrana)\
**Post date:** [June 19, 2020, 9:13pm UTC](https://forum.compas-framework.org/t/mesh-from-json/348/2 "2020-06-19T21:13:15Z")

</div>

My guess is that the compas version in which the `.json` file was originally created is older than the one where you are trying to load it. Does the problem persist if you try loading the `.json` file with an older compas?

---

<div class="post-metadata">

**Author:** ![SalMo](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@SalMo](https://forum.compas-framework.org/u/SalMo)\
**Post date:** [June 21, 2020, 4:32pm UTC](https://forum.compas-framework.org/t/mesh-from-json/348/3 "2020-06-21T16:32:01Z")

</div>

Hi Rafael. Thanks for the hint! I think that was the problem. It is solved now!

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [June 24, 2020, 7:54am UTC](https://forum.compas-framework.org/t/mesh-from-json/348/4 "2020-06-24T07:54:44Z")

</div>

hi,

would you mind filing an issue about this?  
although the current version of dealing with json data is preferred, it should not fail on older versions…

thanks

---

<div class="post-metadata">

**Author:** ![SalMo](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@SalMo](https://forum.compas-framework.org/u/SalMo)\
**Post date:** [June 24, 2020, 10:56am UTC](https://forum.compas-framework.org/t/mesh-from-json/348/5 "2020-06-24T10:56:43Z")

</div>

The issue is posted!

---

<div class="post-metadata">

**Author:** ![gonzalocasas](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/gonzalocasas/32/127_2.png) [@gonzalocasas](https://forum.compas-framework.org/u/gonzalocasas)\
**Post date:** [July 21, 2020, 3:24pm UTC](https://forum.compas-framework.org/t/mesh-from-json/348/6 "2020-07-21T15:24:45Z")

</div>

Linking the topic to the issue: [https://github.com/compas-dev/compas/issues/567](https://github.com/compas-dev/compas/issues/567)
