migamake / json-autotype

Automatic Haskell type inference from JSON input
149 stars 23 forks source link

Example JSON file that does not work #3

Closed FranklinChen closed 9 years ago

FranklinChen commented 9 years ago

I ran on the following file but got an error.

$ json-autotype events.json
$ runghc JSONTypes.hs events.json
Mismatched JSON value: Object ...
{"results":[{"utc_offset":-14400000,"venue":{"country":"us","city":"Pittsburgh","address_1":"5972 Baum Blvd","name":"The Cloakroom","lon":-79.92588,"id":23477578,"state":"PA","lat":40.460598,"repinned":false},"headcount":0,"visibility":"public","waitlist_count":0,"created":1421598902000,"fee":{"amount":5,"accepts":"cash","description":"per person","currency":"USD","label":"Price","required":"1"},"maybe_rsvp_count":0,"description":"<p><img src=\"http:\/\/photos2.meetupstatic.com\/photos\/event\/a\/1\/6\/2\/600_433361314.jpeg\" \/><\/p> <p>Take your code to the next level by learning about the Model View Controller design pattern. In this lecture, Carter Fort will present the principals of object oriented programming and then dive into making your code more organized and optimized with the MVC pattern.<\/p> <p>You'll learn<\/p> <p>- Object oriented programming<\/p> <p>- Classes<\/p> <p>- Inheritance<\/p> <p>- Object relationships<\/p> <p>- Models<\/p> <p>- Views<\/p> <p>- Controllers<\/p> <p>- Why spaghetti code is bad<\/p> <p><br\/><img src=\"http:\/\/photos1.meetupstatic.com\/photos\/event\/b\/f\/c\/3\/600_432109091.jpeg\" \/><\/p> <p><i><b>$5?!<\/b><\/i><\/p> <p>That's right. To encourage attendees to be loyal to their RSVP, we will be charging a nominal fee. <\/p> <p>If the fee is a problem and will prevent you from attending, please contact Justin privately using the Meetup messaging feature to have the fee waived.<\/p> <p>You can pay through Meetup.com or the Code &amp; Supply website at <a href=\"http:\/\/www.codeandsupply.co\/workshops\/starterseries-reservation-fee\"><a href=\"http:\/\/www.codeandsupply.co\/workshops\/starterseries-reservation-fee\" class=\"linkified\">http:\/\/www.codeandsupply.co\/workshops\/starterseries-reservation-fee<\/a><\/a><\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/219914056\/","yes_rsvp_count":26,"name":"#StarterSeries: Software Design Patterns: MVC and Object Oriented Programming","id":"219914056","time":1427562000000,"updated":1426443475000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"venue":{"country":"us","city":"Pittsburgh","address_1":"544 Miltenberger St.","name":"StartUpTown","lon":-79.9814,"id":23668599,"state":"PA","lat":40.437489,"repinned":false},"headcount":0,"visibility":"public","waitlist_count":0,"created":1419430410000,"maybe_rsvp_count":0,"description":"<p>Let's get together and build some awesome stuff with code. We'll get some food and hold an impromptu co-working space where you can work on a project, pair, learn, and mingle.<\/p> <p>You can hack on anything! Any language, framework, public\/open-source, personal, etc. You don’t have to have an idea to hack on! You’re more than welcome to come just to pair with someone. <\/p> <p>Build Night is built for all skill levels. Come with what you know. If you have something you're interested in learning, Build Night is a good place to do so because there will be experts in the room to help with just about anything. <\/p> <p><img src=\"http:\/\/photos3.meetupstatic.com\/photos\/event\/9\/7\/b\/0\/600_432098832.jpeg\" \/><\/p> <p><b>Project Inspirations<\/b><\/p> <p>As part of our Build Nights, we're going to start maintaining a list of project inspirations. Creative resources or projects that may spark an idea to build something awesome. If you'd like to get something included in this list, leave a comment or email Justin.<\/p> <p><a href=\"http:\/\/image-net.org\/index\"><a href=\"http:\/\/image-net.org\/index\" class=\"linkified\">http:\/\/image-net.org\/index<\/a><\/a><\/p> <p><a href=\"https:\/\/www.codemontage.com\/projects\"><a href=\"https:\/\/www.codemontage.com\/projects\" class=\"linkified\">https:\/\/www.codemontage.com\/projects<\/a><\/a><\/p> <p><a href=\"https:\/\/github.com\/colonizers\/colonizers\"><a href=\"https:\/\/github.com\/colonizers\/colonizers\" class=\"linkified\">https:\/\/github.com\/colonizers\/colonizers<\/a><\/a><\/p> <p>\n\n\n<b>Parking info:<\/b> When arriving at StartUpTown, street parking is free after 6:00 and there is a lot on Locust St, across the street from the big warehouse under construction. This log has a small sign in the back that says “PFEX PARKING.” Additionally, the small grassy area behind the building on the north side of Edna St is open (but DO NOT park on the south side of Edna). These lots are marked on this map. <a href=\"http:\/\/i.imgur.com\/QrAvJNZ.jpg?1\"><a href=\"http:\/\/i.imgur.com\/Qr\" class=\"linkified\">http:\/\/i.imgur.com\/Qr<\/a>...<\/a>­<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/219408379\/","yes_rsvp_count":25,"name":"Build Night","id":"219408379","time":1427752800000,"updated":1426693434000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"venue":{"country":"us","city":"Pittsburgh","address_1":"3710 Forbes Ave.","name":"Revv Oakland","lon":-79.957092,"id":23691216,"state":"PA","lat":40.441185,"repinned":false},"rsvp_limit":25,"headcount":0,"visibility":"public","waitlist_count":4,"created":1426018997000,"maybe_rsvp_count":0,"description":"<p>The first Pittsburgh Django Meetup under the Code &amp; Supply Banner! We're excited to gather the Pittsburgh Django community into one place. <\/p> <p>For this first event, Andrew Somerville will be presenting a talk on <a href=\"http:\/\/django-rest-framework.org\">Django Rest Framework<\/a>. Andrew has recently started using Django Rest Framework, and the presentation will be from a new user's perspective. The following topics will be covered:<\/p> <p>• Integrating into existing site<\/p> <p>• Authentication<\/p> <p>• Django forms integration<\/p> <p>• Potential duplicate work<\/p> <p>• URL Routing<\/p> <p>• Permissions<\/p> <p>• Comparison to Tasty Pie and other frameworks<\/p> <p>•  Is REST necessity for your application?<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/221062483\/","yes_rsvp_count":25,"name":"Django PGH: Django Rest Framework","id":"221062483","time":1427842800000,"updated":1426630976000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1424984497000,"maybe_rsvp_count":0,"event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/220785196\/","yes_rsvp_count":3,"name":"Monthly summary happy hour","id":"220785196","time":1427929200000,"updated":1424984497000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1417653629000,"maybe_rsvp_count":0,"description":"<p>Planning and prototyping in order to clarify what your software will do.<\/p> <p>Carter Fort to present<\/p> <p><img src=\"http:\/\/photos3.meetupstatic.com\/photos\/event\/9\/7\/b\/0\/600_432098832.jpeg\" \/><\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/219053254\/","yes_rsvp_count":8,"name":"Planning & Prototyping Software","id":"219053254","time":1428361200000,"updated":1417654102000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1421355947000,"maybe_rsvp_count":0,"description":"<p>Remy Porter will present an introduction to Erlang, with a focus on concurrency.<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/219860617\/","yes_rsvp_count":5,"name":"Intro to Erlang","id":"219860617","time":1428534000000,"updated":1421370784000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"venue":{"zip":"15217","country":"us","city":"Pittsburgh","address_1":"1710 Murray Ave","name":"M*Modal","lon":-79.92305,"id":13020272,"state":"PA","lat":40.437515,"repinned":false},"headcount":0,"visibility":"public","waitlist_count":0,"created":1426269384000,"maybe_rsvp_count":0,"description":"<p>The process of data validation can be messy and annoying, especially in the case of composite data where there could be many sources of errors and a need to collect all the errors found rather than bail out upon finding the first one. In practice, what often happens is that thorough validation ends up not being done because it's too painful to code. Martin Fowler recently wrote an article about the problem and proposed a solution <a href=\"http:\/\/martinfowler.com\/articles\/replaceThrowWithNotification.html\"><a href=\"http:\/\/martinfowler.com\/articles\/replaceThrowWithNotification.html\" class=\"linkified\">http:\/\/martinfowler.com\/articles\/replaceThrowWithNotification.html<\/a><\/a> but it is also painful.<\/p> <p>There is a very clean solution that can be expressed in any language, so we will show the language-independent concepts so that you can use them anywhere.<\/p> <p>However, since the solution is particularly concise to express in a certain class of languages that includes Scala, Rust, Swift, and Haskell, we will present concrete code in Scala, Rust, Swift, and Haskell to illustrate the concepts.<\/p> <p>\n\n\nSpeaker =&gt; Franklin Chen<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/221130516\/","yes_rsvp_count":5,"name":"Fuss-free data validation without using exceptions: Scala, Rust, Swift, Haskell","id":"221130516","time":1428616800000,"updated":1426279643000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1424128923000,"maybe_rsvp_count":0,"event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/220567396\/","yes_rsvp_count":4,"name":"Val Head on \"Motion Design for the Web\"","id":"220567396","time":1428966000000,"updated":1424711952000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1421356483000,"maybe_rsvp_count":0,"description":"<p><b>Callback-free Concurrency: Elixir vs Node.js<\/b><\/p> <p>Tired of callback hell and fighting with the event loop? Node.js is a popular choice for building real-time applications, but it comes with some serious drawbacks. Elixir, a new functional language targeting the Erlang VM, promises to combine the stability and scalability of Erlang with the expressiveness of Ruby. In this session, two implementations of the same real-time application will be compared: one written in Node.js and one written in Elixir. You will learn how Node and Elixir solve the same problems in very different ways, and see how Elixir enables massive concurrency and fault tolerance with code that is callback-free, concise, testable, and easy to reason about.<\/p> <p><img src=\"http:\/\/photos1.meetupstatic.com\/photos\/event\/a\/5\/0\/5\/600_433362245.jpeg\" \/><\/p> <p><b>About our presenter<\/b><\/p> <p><img src=\"http:\/\/photos4.meetupstatic.com\/photos\/event\/a\/4\/e\/9\/600_433362217.jpeg\" \/><\/p> <p><b>Chris Geihsler<\/b> has been writing code professionally for 12 years in the healthcare and education industries using C#, Ruby, and JavaScript. He currently works at Think Through Math where he builds a product that helps more than 3,000,000 kids get better at math. At home, he tries to fend off his four cats to find time to be dangerous with Elixir, Rust, and Go. His cats usually win.<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/219860856\/","yes_rsvp_count":3,"name":"Callback-free Concurrency: Elixir vs Node.js","id":"219860856","time":1429570800000,"updated":1421356483000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1419366295000,"maybe_rsvp_count":0,"description":"<p>Taking suggestions<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/219397838\/","yes_rsvp_count":4,"name":"Charity Outing","id":"219397838","time":1429966800000,"updated":1419366295000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1421356083000,"maybe_rsvp_count":0,"event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/219860684\/","yes_rsvp_count":1,"name":"Build Night","id":"219860684","time":1430172000000,"updated":1421356083000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1427374278000,"maybe_rsvp_count":0,"description":"<p>Joe Perks will provide an introduction to AWS CloudFormation and AWS OpsWorks, including deploying\/updating a CloudFormation template and an overview of how OpsWorks interfaces with Chef.<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/221414556\/","yes_rsvp_count":1,"duration":4500000,"name":"Intro to AWS CloudFormation and AWS OpsWorks","id":"221414556","time":1430262000000,"updated":1427374278000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1424192198000,"maybe_rsvp_count":0,"description":"<p>Philip Thompson will present on distributed, NoSQL databases. Come take a look at a few different solutions to scaling out past the traditional master-slave set up. Examples will include MongoDB, and Apache Cassandra. The presentation will discuss the limitations of traditional systems, and the tradeoffs made to avoid limitations such as eventually consistent architectures.\"<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/220580924\/","yes_rsvp_count":6,"name":"Distributed, NoSQL databases","id":"220580924","time":1430348400000,"updated":1424192198000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"venue":{"country":"us","city":"Pittsburgh","address_1":"115 Atwood Street","name":"NoWait","lon":-79.957893,"id":21436512,"state":"PA","lat":40.441353,"repinned":false},"headcount":0,"visibility":"public","waitlist_count":0,"created":1424145047000,"maybe_rsvp_count":0,"description":"<p>Mike Riley of NoWait Presents<br\/><b>Ship Code Twice a Day. Strategies for Pushing Code and Code Reviews<\/b><\/p> <p>A talk on the process that Facebook uses to ship their code twice a day, and it's where the Phabricator tool was born. <a href=\"http:\/\/phabricator.org\/\" class=\"linkified\">http:\/\/phabricator.org\/<\/a><\/p> <p>High level:<br\/>- Everyone works directly off of master, no long running branches, actually just a branch per \"idea\"<br\/>-Control access to features which you aren't done with by using feature toggles<br\/>-No code is ever pushed until someone else has looked at it and says its ok<br\/>-At no point is your published code ever in a non-production-ready state<br\/>-Phabricator is the only vertically integrated solution that allows you to easily do this, but you can mix and match various other platforms to achieve the same end result<\/p> <p>\n\n\nEmma Trimble presents<\/p> <p><b>Ansible<\/b><\/p> <p>Emma will present on Ansible, the tool to automate apps and IT infrastructure. Application Deployment + Configuration Management + Continuous Delivery.<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/220572352\/","yes_rsvp_count":8,"name":"Ship Code Twice a Day. Strategies for Pushing Code and Code Reviews","id":"220572352","time":1430780400000,"updated":1424320595000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1424721369000,"maybe_rsvp_count":0,"event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/220712067\/","yes_rsvp_count":2,"name":"Jamie Forrest on an iOS subject","id":"220712067","time":1430953200000,"updated":1424721369000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1423194654000,"maybe_rsvp_count":0,"event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/220341498\/","yes_rsvp_count":1,"name":"Lin Clark - npm for Teams","id":"220341498","time":1431385200000,"updated":1423197459000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"venue":{"zip":"15217","country":"us","city":"Pittsburgh","address_1":"1710 Murray Ave","name":"M*Modal","lon":-79.92305,"id":13020272,"state":"PA","lat":40.437515,"repinned":false},"headcount":0,"visibility":"public","waitlist_count":0,"created":1426279981000,"maybe_rsvp_count":0,"description":"<p>Justin Pihony will present on Apache Spark (updated blurb in the coming weeks)<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/221133832\/","yes_rsvp_count":2,"duration":7200000,"name":"Introduction to Apache Spark using Scala","id":"221133832","time":1431640800000,"updated":1426279981000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"},{"utc_offset":-14400000,"headcount":0,"visibility":"public","waitlist_count":0,"created":1427392247000,"maybe_rsvp_count":0,"description":"<p>Design and engineering are two sides of the same coin. In this talk tailored to non-designers, we'll discuss:<\/p> <p><br\/>• What design is, compared to what people *think* it is.<\/p> <p><br\/>• Why anyone should even care about design.<\/p> <p><br\/>• How to integrate design thinking into your existing workflow. <\/p> <p>Talk by Jordan Koschei (<a href=\"https:\/\/twitter.com\/jordankoschei\">@jordankoschei<\/a>). Jordan is a designer, developer, and essayist. He's the Director of UX\/UI at <a href=\"http:\/\/fusionhome.com\/\">Fusion Media<\/a>, where he helps design internal tools for the Fortune 500. In addition to several side projects, he's also the Opinion Editor at <a href=\"http:\/\/theindustry.cc\/\">The Industry<\/a>.<\/p>","event_url":"http:\/\/www.meetup.com\/Pittsburgh-Code-Supply\/events\/221420747\/","yes_rsvp_count":3,"name":"Design for Engineers","id":"221420747","time":1432162800000,"updated":1427406645000,"group":{"join_mode":"open","created":1395326446000,"name":"Pittsburgh Code & Supply","group_lon":-79.98999786376953,"id":13452572,"urlname":"Pittsburgh-Code-Supply","group_lat":40.45000076293945,"who":"Members"},"status":"upcoming"}],"meta":{"next":"","method":"Events","total_count":18,"link":"https:\/\/api.meetup.com\/2\/events","count":18,"description":"Access Meetup events using a group, member, or event id. Events in private groups are available only to authenticated members of those groups. To search events by topic or location, see [Open Events](\/meetup_api\/docs\/2\/open_events).","lon":"","title":"Meetup Events v2","url":"https:\/\/api.meetup.com\/2\/events?offset=0&format=json&limited_events=False&sig=af3d1d433773ee222ada87767951d760d79a797c&group_id=13452572&photo-host=public&page=20&fields=&sig_id=5977224&order=time&desc=false&status=upcoming","id":"","updated":1427406645000,"lat":""}}
mgajda commented 9 years ago

Yes, there is still room for improvement. I will hopefully fix this one soon.

mgajda commented 9 years ago

It would help to have this file as an attachment though. When I tried to copy it from the web page I got a message about invalid JSON.

FranklinChen commented 9 years ago

GitHub doesn't allow non-image attachments, so here is a link to events.json to elsewhere: http://pastebin.com/raw.php?i=QmSGi0wG

FranklinChen commented 9 years ago

I took a quick look at what happened. Basically, given an array of objects, the inference of the possible type of an object is not taking into account optional fields, e.g., description should have come out as a Maybe Text.

FranklinChen commented 9 years ago

I see that progress has been made on this, thanks! One thing missing is that the FromJSON instance is being generated incorrectly, e.g., if a field "fee" is optional, we need

v .:? "fee"

instead of

v .: "fee"
mgajda commented 9 years ago

I also spotted this problem and will probably fix it over Easter. As I aim for a stable version in a month, I setup automatic test generation for this and many other problems. Best Michal

On Thursday, April 2, 2015, Franklin Chen notifications@github.com wrote:

I see that progress has been made on this, thanks! One thing missing is that the FromJSON instance is being generated incorrectly, e.g., if a field "fee" is optional, we need

v .:? "fee"

instead of

v .: "fee"

— Reply to this email directly or view it on GitHub https://github.com/mgajda/json-autotype/issues/3#issuecomment-88682899.

Pozdrawiam Michał

mgajda commented 9 years ago

I've just uploaded version 0.2.5.13, which seems to fix the issue in {{events.json}}.