Re: [racket] Issue with require/typed and the json library

2014-12-10 Thread Neil Van Dyke
John Clements wrote on 12/10/2014 02:56 PM: Possibly related: the last time I checked, there was no widely adopted schema system for JSON, which is completely appalling. That is, it’s not possible to document an HTTP call as “returning a JSON object with field “timestamp” which is an integer an

Re: [racket] Issue with require/typed and the json library

2014-12-10 Thread John Clements
Possibly related: the last time I checked, there was no widely adopted schema system for JSON, which is completely appalling. That is, it’s not possible to document an HTTP call as “returning a JSON object with field “timestamp” which is an integer and “value” which is a string and no other fields

Re: [racket] Issue with require/typed and the json library

2014-12-06 Thread Matthias Felleisen
On Dec 6, 2014, at 1:08 AM, Alexis King wrote: >> It doesn’t have to be a struct, but the problem is that typed racket doesn’t >> know that a value of type String for instance will be of type JSExpr or not, >> so you would have to put (assert x jsexpr?) around everything that you want >> to tr

Re: [racket] Issue with require/typed and the json library

2014-12-05 Thread Alexis King
> It doesn’t have to be a struct, but the problem is that typed racket doesn’t > know that a value of type String for instance will be of type JSExpr or not, > so you would have to put (assert x jsexpr?) around everything that you want > to treat as a jsexpr. Ah, that’s interesting. I’d seen as

Re: [racket] Issue with require/typed and the json library

2014-12-05 Thread Alexander D. Knauth
On Dec 5, 2014, at 11:30 PM, Alexis King wrote: > I’ve been having an issue figuring out how to properly use the json library > in typed racket, so I posted a question about it on SO. Any help would be > greatly appreciated! > > Racket Users list: > http://lists.racket-l

[racket] Issue with require/typed and the json library

2014-12-05 Thread Alexis King
I’ve been having an issue figuring out how to properly use the json library in typed racket, so I posted a question about it on SO. Any help would be greatly appreciated! Racket Users list: http://lists.racket-lang.org/users