corpus-db icon indicating copy to clipboard operation
corpus-db copied to clipboard

Full text wrapped in square brackets

Open smythp opened this issue 6 years ago • 1 comments

When getting a full text, like in this example:

http://corpus-db.org/api/id/108/fulltext

the result is wrapped in square brackets. That means that when loaded into JSON it's a list with 1 item in it (the dictionary) rather than just a dictionary. Think it would be better without the brackets so it wouldn't need to be parsed out.

smythp avatar Mar 22 '18 21:03 smythp

Good point. I just use one function for getting full text of many texts, and for getting full text of a single text. But a single text shouldn't need to be a list of length one. I'll make a function that returns single texts.

JonathanReeve avatar Mar 23 '18 00:03 JonathanReeve