On Mon, Aug 25, 2014 at 12:15:29PM -0700, David E. Wheeler wrote: > I know. What I'm suggesting is a DBD::Pg switch that auto-converts between > /JSONB?/ values and hashes and arrays (assuming an appropriate JSON > parser is installed).
That's already the plan. Since we know the json type oid already, we
will add a flag such that when on, json can be slung back and forth
seamlessly as arrays are now. Arrays are already fully automatic and
out the barn door, but perhaps a more generic interface such as:
$dbh->pg_automatic_convert('json');
In which 'json' can be replaced by other things down the road. Or even
allow a second arg to a user coderef/object that knows how to convert
certain things.
--
Greg Sabino Mullane [email protected]
End Point Corporation
PGP Key: 0x14964AC8
signature.asc
Description: Digital signature
