api-docs icon indicating copy to clipboard operation
api-docs copied to clipboard

Tech Transfer api's JSON data shows unnecessary tags and special letters which are not removal while developing an App.

Open kushalsharma12 opened this issue 2 years ago • 3 comments

This is the example query -> https://api.nasa.gov/techtransfer/patent/?engine&api_key=DEMO_KEY

And it shows like these letters ->

Screenshot 2021-08-16 095808

Due to which I am getting responses like this ->

Screenshot 2021-08-16 184836 Screenshot 2021-08-16 185703

If these tags can be removed it will be really helpful. Or if there any way anyone can suggest me to remove those tags from my it would be great. Here is my data class ->

            @Parcelize
         data class Patent(
         val count: Int,
         val page: Int,
         val perpage: Int,
         val results: List<List<String>>,
         val total: Int
             ) : Parcelable

You can check app on playstorehttps://play.google.com/store/apps/details?id=com.kushalsharma.nasawalli I have to solve this ASAP. Is there any way to solve this?

kushalsharma12 avatar Aug 17 '21 03:08 kushalsharma12

As mentioned on the page and in the README, the admins of api.nasa.gov typically don't host the APIs themselves.

The individuals that control the API would be the admins of https://technology.nasa.gov/

However, there's probably 2 general approaches to dealing with it. (A) In whatever language you're using, strip out anything that's inside of a tag using regular expressions, your own parsing function, or packages built for this in your language of choice. (B) Alternatively, you could leave in the tags and simply treat that string as a HTML instead of a text when you add it to your HTML page. This might require writing some CSS to the deal with things like the "highlight" class.

JustinGOSSES avatar Aug 25 '21 13:08 JustinGOSSES

You might want to contact techtransfer at this email to let them know how this change in their content affects API users: [email protected]

JustinGOSSES avatar Aug 25 '21 13:08 JustinGOSSES

Thanks man, I resolved this issue just by implementing some HTML stuff in android studio. But I wonder if api performance can be improved more. As the active users increase on daily basis, it is takes lot of time to load the data.

kushalsharma12 avatar Aug 27 '21 03:08 kushalsharma12