import { ExifDate } from "./ExifDate" ; import { ExifDateTime } from "./ExifDateTime" ; import { ExifTime } from "./ExifTime" ; const Revivers = { ExifDateTime : ( ea ) => ExifDateTime . fromJSON ( ea ) , ExifDate : ( ea ) => ExifDate . fromJSON ( ea ) , ExifTime : ( ea ) => ExifTime . fromJSON ( ea ) , } ; export function parseJSON ( s ) { return JSON . parse ( s , ( _key , value ) => Revivers [ value ?. _ctor ] ?. ( value ) ?? value ) ; }