strict JSON compatible AST construction