API returns truncated inscriptions
See original GitHub issueE.g
$ curl --compressed -s 'https://openbenches.org/data.json/?bench=8553&format=raw' | jq .features[].properties.popupContent
"GREATER LIVE HATH<br />\r\nNO MAN OR WOMAN<br />\r\n<br />\r\nTO THE MEMORY OF<br />\r\nCHARLES THOMAS<br />\r\nKENNEDY VC<br />\r\n<br />\r\nHIGHLAND LIGHT INFANTRY<br />\r\nBOER WAR<br />\r\n<br />\r\nBORN …"
compare to what’s shown at https://openbenches.org/bench/8553 Truncation seems to be due to https://github.com/edent/openbenches/blob/baa2fa5dc355b0a65c9739233ddc58b25ddbf919/www/mysql.php#L252 which is used both to get text to display on map, in which context it’s reasonable to truncate, and for API where it doesn’t seem reasonable to truncate.
The API section of the README doesn’t mention that inscription text may be truncated.
The indiscriminate appending of … means inscriptions shown on the map always look like they’ve been truncated regardless of whether they have.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Request to API getting truncated - Stack Overflow
I have an Asp.net API application running on Windows data center 2019 and some of the requests for an API get truncated.
Read more >JSON responses are being truncated #1317 - ktorio/ktor - GitHub
I have two nearly-identical strings (containing valid JSON) and each is used by a MockEngine as GET responses. Calling HttpClient.get<T>(String, ...
Read more >Rest request body is sometimes truncated - Microsoft Q&A
I have an Asp.net API app where one of the API's requests are randomly missing some of the body's content starting from the...
Read more >API design - indicate that results were truncated
For reasons, my search endpoint returns a maximum of 50 results. I'm struggling with how best to tell the caller that their results...
Read more >Epigraphic Database Heidelberg using R
Accessing the EDH database using R · Search parameters for inscriptions and geography · Search parameters for inscriptions · Search parameters for ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I like to keep default behaviour the same wherever possible. That way cached requests don’t break in unexpected ways, and anyone who hasn’t seen the update doesn’t become confused.
Ah, OK. I see the README does say as such. In the PR I submitted not truncating was the default and you didn’t mention intention to change it so I was expecting that behaviour. Out of curiosity, why make people have to explicitly request that inscriptions are complete?