Use regular methods for json error handling

The json error handling was started before the validation was extracted
to its own class, that's why it was implemented as a class method.
Since it is now only used in the same class there is no point in
using class methods.