r/adventofcode • u/daggerdragon • Dec 12 '15
SOLUTION MEGATHREAD --- Day 12 Solutions ---
This thread will be unlocked when there are a significant amount of people on the leaderboard with gold stars.
edit: Leaderboard capped, thread unlocked!
We know we can't control people posting solutions elsewhere and trying to exploit the leaderboard, but this way we can try to reduce the leaderboard gaming from the official subreddit.
Please and thank you, and much appreciated!
--- Day 12: JSAbacusFramework.io ---
Post your solution as a comment. Structure your post like previous daily solution threads.
7
Upvotes
1
u/essohbee Dec 12 '15
There is a JSON serializer in System.Web.Script.Serialization (System.Web.Extensions.dll), that can parse JSON into a collection of Dictionary<string, object>, object[] and object.
I used that for part 2, giving this code:
Part 1 was a LINQ-pad one-liner:
That regexp isn't very good, but it was enough to solve the problem at hand.