DEV Community

Sayali Hedalkar
Sayali Hedalkar

Posted on

Inconsistent JSON Structure and Incorrect Data Extraction from Sarvam Vision API

Hello Everyone, I am encountering issues with the inconsistent JSON format returned by the Sarvam Vision OCR API. The response structure varies between requests, making it difficult to handle the extracted data consistently. Specifically:

Inconsistent JSON Structure:

In some cases, the response has fields under personal_info, identification, and metadata.

In other cases, the same fields are either missing or placed at the root level, leading to unpredictable JSON structures.

Incorrect Data Extraction:

The extracted data is sometimes incorrect, with misplaced or missing values for important fields like passport_number, surname, and birth_place.

Request:

We need a consistent JSON structure for all responses that includes key-value pairs. This will make it easier to handle and process the data reliably.

Top comments (0)