G
GoTool

Developer Blog

Tips, guides and tutorials for developers

How to Convert Go Struct Debug Output (%+v / %#v) to JSON

Go's fmt.Printf %+v and %#v output looks structured but isn't JSON. Learn how to convert Go struct, map, and slice debug output to valid JSON.

2026-03-13Go, JSON, struct

Converting PHP Debug Output (print_r / var_dump / var_export) to JSON

PHP's print_r, var_dump, and var_export produce human-readable output that isn't JSON. Learn how to convert all 3 formats — plus serialize() — to valid JSON.

2026-03-13PHP, JSON, print_r

How to Convert Rust Debug Output ({:?} / {:#?}) to JSON

Rust's #[derive(Debug)] output looks structured but isn't JSON. Learn how to convert Debug trait output — structs, enums, Vec, HashMap — to valid JSON.

2026-03-13Rust, JSON, Debug

JWT Token Structure Explained: Header, Payload, and Signature

Understand the three parts of a JWT token — Header, Payload, and Signature. Learn how JWT authentication works, common security mistakes, and how to debug tokens.

2026-03-13JWT, authentication, security

UUID vs ULID vs NanoID: Which Unique ID Should You Use?

Compare UUID (v4/v7), ULID, and NanoID — their formats, sortability, collision probability, and database performance. A practical guide to choosing the right ID.

2026-03-13UUID, ULID, NanoID

Cron Expression Complete Guide: From Basics to Advanced

Master cron expressions — learn the 5-field format, special characters, 10 most common patterns, and pitfalls across Linux, Kubernetes, GitHub Actions, and Spring.

2026-03-13Cron, scheduling, Linux

MySQL DDL to Go Struct: Type Mapping, NULL Handling, and Best Practices

Complete guide to converting MySQL CREATE TABLE to Go structs — type mapping, NULL handling with pointers, naming conventions, struct tags, and the DECIMAL precision problem.

2026-03-13Go, MySQL, struct

Go Struct Tag Complete Guide: json, db, gorm, validate, and More

Master Go struct tags — json, db, gorm, validate, bson, yaml. Learn the syntax, common options, combining multiple tags, and the most frequent mistakes.

2026-03-13Go, struct tags, GORM

Go Error Handling: Patterns, Best Practices, and Automation

Master Go's if err != nil pattern — learn the 4 common error handling styles, best practices for error wrapping with fmt.Errorf, and how to automate boilerplate.

2026-03-10Go, error handling, fmt.Errorf

Go Struct Validation: A Complete Guide to Validate Tags

Master go-playground/validator tags — learn the most used rules (required, min, max, oneof, email), common mistakes, and how to test your tags before deploying.

2026-03-10Go, validation, struct tags

5 Common Invalid JSON Formats and How to Fix Them

Developers encounter broken JSON daily — from Python dicts to Java Map output. Learn how to identify and fix the 5 most common non-standard JSON formats.

2026-03-09JSON, debugging, Python

Python Dict vs JSON: Key Differences and How to Convert

Learn why Python dict output isn't valid JSON, the 5 key differences between them, and how to convert Python dict strings to proper JSON quickly.

2026-03-09Python, JSON, dict

3 Ways to Convert Java Map.toString() Output to JSON

Java's Map.toString() output looks like JSON but isn't. Learn 3 approaches to convert {key=value} format to valid JSON, including handling nested maps.

2026-03-09Java, JSON, HashMap

What is JSON5? Why Your Config Files Might Need It

JSON5 extends JSON with comments, trailing commas, unquoted keys, and more. Learn what JSON5 adds, where it's used, and how to convert between JSON5 and JSON.

2026-03-09JSON5, JSON, configuration

How to Extract JSON from Log Files Quickly

Learn practical techniques to extract and fix JSON buried in log files — from grep and regex approaches to handling broken JSON with nested brackets.

2026-03-09JSON, logs, debugging