Code Snippets

Category: Utilities

Parse JSON with serde

Derive Serialize/Deserialize and round-trip a struct.

Author: chris

Generate a UUID in Ruby

Generate a v4 UUID with the SecureRandom stdlib.

Author: chris

Parse and Generate JSON in Ruby

Parse a JSON string into a Hash and convert back with the json stdlib.

Author: chris

Parse and Encode JSON in Perl

Round-trip JSON with the JSON module: decode to a Perl hashref and re-encode.

Author: chris