to_json not resolving db_fields #654

adding capability to extract json (to_json) using the field names and instead of the defined db_names, if those are set