move json helper methods in concern