[racket-users] Re: Working with JSON using Typed Racket

2020-03-30 Thread Wesley Bitomski
Hello Ed, I generally get some mileage out of using custom predicates (those that are made with define-predicate) and pattern matching when tearing into JSON structures in Typed Racket. Occurrence typing seems to work with if, cond and assert, along with match's predicate matcher (? form). So,

Re: [racket-users] Re: Working with JSON using Typed Racket

2020-03-31 Thread epi
Thanks Wesley and Matthias! Very helpful advice. March 31, 2020 2:40 AM, "Wesley Bitomski" mailto:wesley.bitom...@gmail.com?to=%22Wesley%20Bitomski%22%20)> wrote: Hello Ed, I generally get some mileage out of using custom predicates (those that are made with define-predicate) and pattern matchin

Re: [racket-users] Re: Working with JSON using Typed Racket

2020-04-08 Thread Phil Nguyen
For parsing JSON in Typed Racket, you can check out this library I made: https://github.com/philnguyen/json-type-provider . You can declare structs and field names that match the underlying data, and get back a well-typed parser. Don't let the name "type provider" fool you though, it's nothing