Day 12: JSAbacusFramework.io [AOC2015 in Rust]

Опубликовано: 06 Июнь 2026
на канале: 0xdf
186
10

The big challenge in Day 12 is to get the given text into a rust JSON object and then recursively parse over it processing it according to the given rules.

Code for 2015 Rust AOC: https://gitlab.com/0xdf/aoc2015-rust
Brown Uni version of the Rust Book: https://rust-book.cs.brown.edu

☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf

[00:00] Introduction
[00:16] Part 1 description
[00:50] Strategy, serde_json crate
[01:34] VSCode, building project
[02:20] Getting JSON into serde_json value
[03:04] Building recursive function to handle values, handling base case, value is number
[06:05] Adding handler for string
[06:42] Adding handler for array
[08:53] Adding handler for object, solving part 1
[10:04] Part 1 recap
[10:34] Part 2 description
[11:03] Updating recursive function to take part2 argument so we can make small changes where it's true
[12:16] Adding check for "red" in object
[13:38] Trouble-shooting small typo, v instead of x, solving part 2