# How to track the source of an error in a build macro (Paring Json)

**URL:** <https://community.haxe.org/t/how-to-track-the-source-of-an-error-in-a-build-macro-paring-json/4265>\
**Category:** Haxe\
**Created:** [June 23, 2024, 3:37pm UTC](https://community.haxe.org/t/how-to-track-the-source-of-an-error-in-a-build-macro-paring-json/4265 "2024-06-23T15:37:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![neimanpinchas](https://community.haxe.org/user_avatar/community.haxe.org/neimanpinchas/32/2348_2.png) [@neimanpinchas](https://community.haxe.org/u/neimanpinchas)\
**Post date:** [June 23, 2024, 3:37pm UTC](https://community.haxe.org/t/how-to-track-the-source-of-an-error-in-a-build-macro-paring-json/4265/1 "2024-06-23T15:37:35Z")

</div>

I am trying to use json2object to parse json strings into real types.

I am getting that error /haxe/haxelib/json2object/3,11,0/src/json2object/reader/DataBuilder.hx:350: characters 34-39 : json2object: Parser of Dynamic are not generated.

Since I am not aware of using dynamic anywhere, I think that a backtrace would be usefull in order to take out and work around the the effecting code, is there a possibility to get a ST?

Not really related to the title, I had pretty good success in the past with json2object, but if anyone had used json2object and another typed json, and had success with one of the others, please reply.  
Other parsers:  
tink\_json ([https://github.com/haxetink/tink\_json](https://github.com/haxetink/tink_json)) compile time, supporting custom parsers  
runtime, tpyesafe error handiling ([Daniel Morgenstern / typed-json · GitLab](https://gitlab.com/dani_987/haxe-typed-json))

Thanks

---

<div class="post-metadata">

**Author:** ![neimanpinchas](https://community.haxe.org/user_avatar/community.haxe.org/neimanpinchas/32/2348_2.png) [@neimanpinchas](https://community.haxe.org/u/neimanpinchas)\
**Post date:** [June 24, 2024, 12:13pm UTC](https://community.haxe.org/t/how-to-track-the-source-of-an-error-in-a-build-macro-paring-json/4265/2 "2024-06-24T12:13:51Z")

</div>

As it is a recursive macro, I’ve added a trace to the macro code, this helped me track the ivocations all the way down until the error.

Not a pretty code change, as we do not want all the logs only on error, but was enough to figure out the error, and the callstack wouldn’t be helpful without knowing the parameter values.
