Create constants and use text codec for form/json