[Haskell-beginners] Reading JSON using Text.JSON
Magnus Therning
magnus at therning.org
Mon May 16 21:21:38 CEST 2011
On Mon, May 16, 2011 at 09:07:25PM +0200, Christopher Done wrote:
> On 16 May 2011 20:59, Magnus Therning <magnus at therning.org> wrote:
> >> readJSON object = do obj <- readJSON object
> >> GlossDef <$> valFromObj "para" obj
> >> <*> valFromObj "GlossSeeAlso" obj
> >
> > FWIW, read the first comment ;-)
> >
> > I still consider the monadic style easier to read than the
> > applicative so that's what I usually start with.
>
> I was more referring to the fact that you're re-implementing
> valFromObj and needlessly pattern matching.
Indeed I am, thanks for pointing that out.
/M
--
Magnus Therning OpenPGP: 0xAB4DFBA4
email: magnus at therning.org jabber: magnus at therning.org
twitter: magthe http://therning.org/magnus
Perl is another example of filling a tiny, short-term need, and then
being a real problem in the longer term.
-- Alan Kay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110516/e16f5926/attachment.pgp>
More information about the Beginners
mailing list