How to create syntax highlighting code editohr

I need to create a form in my app which will allow users to create json code. What would be the best way to duplicate the look of a syntax highlighting code editor in an appgyver primitive input? I am thinking some kind of formula which will change the color of certain characters or matching regex. Has anyone done this before?

I dont think thats possible, but you could at least indicate the line of the problem using an icon (assuming you know the line of the problem i dont know if thats possible too) and then you could have an error message to show more details