@welldot/core
deserializeWell
Parses a JSON string produced by serializeWell (or older legacy formats) and returns a normalized Well object.
deserializeWell(
jsonString):Well|null
Parses a JSON string produced by serializeWell (or older legacy formats) and returns a normalized Well object.
Handles:
- Versioned format v1 and v2
- Legacy format with
constructive/geologicsub-objects - Legacy
diam_polinch diameters →diametermm conversion - Typo
bole_hole→bore_holecompatibility - v1→v2 normalizations:
fgdc_texture,screen_slot_mm,lat/lng/elevation → location
Parameters
jsonString
string
Raw JSON string to parse.
Returns
Well | null
A normalized Well, or null if the parsed data is empty.
Throws
If jsonString is not valid JSON.
Throws
If the version field is present but not supported.