How to retrieve json data from custom json enpoint created from a custom post type

How to retrieve json data from custom json enpoint created from a custom post type