Confirmation re size of Array[Entry] in v2

shahoodshahood Member ✭✭
edited April 16 in Report a bug

Hi @AmosDuveen & rest of ODAPI team,

First of all, congrats for successfully releasing v2 on the scheduled date. My first impression is that JSON schema of v2 is more straight forward and cleaner compared to v1. So, I hope it will be easier to implement as well.

I just need a confirmation with respect to one of the major changes in JSON. Is it safe to assume that the size of Array[Entry] at the level of lexicalEntry will always be 1? If not, can you please share some instances where it is more than 1?

Thanks

Tagged:

Comments

  • shahoodshahood Member ✭✭

    Hi @Simone I've erroneously selected a wrong category for this discussion. So, pl move it to General or something more appropriate, if it is not such a big issue.

    Thanks

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    Thanks for feeding back all of these issues, I have passed them onto our developers to investigate.

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    Apparently that assumption is not safe to make e.g. in whatever:

            {
                "id": "whatever",
                "metadata": {
                    "operation": "retrieve",
                    "provider": "Oxford University Press",
                    "schema": "RetrieveEntry"
                },
                "results": [
                    {
                        "id": "whatever",
                        "language": "en-gb",
                        "lexicalEntries": [
                            {
                                "entries": [...],
                                "text": "whatever"
                            },
                            {
                                "entries": [...],
                                "text": "whatever"
                            },
                            {
                                "entries": [...],
                                "text": "whatever"
                            }
                        ],
                        "type": "headword",
                        "word": "whatever"
                    }
                ],
                "word": "whatever"
            }
    
  • shahoodshahood Member ✭✭

    Hi @AmosDuveen

    Nice! I'll dig deeper into it and reply, if the need arises. So far, this change appears to be an improvement over v1 although it would require a lot of code change.

    Thanks for the follow up!

  • shahoodshahood Member ✭✭

    Hi @AmosDuveen

    Can u pl share a couple more such words? I have made code changes as per the JSON of 'whatever' but I need to test it with a variety of words.

    Thanks

Sign In or Register to comment.