Finally json unmarshalls successfully for any functions argument type using reflection.