Home / Companies / Starburst / Blog / Post Details
Content Deep Dive

Parsing

Blog post from Starburst

Post Details
Company
Date Published
Author
Jordan Zimmerman
Word Count
1,496
Language
English
Hacker News Points
-
Summary

The article explores the process of parsing JSON text in Java, focusing on converting a stream of characters into JSON tokens using a Java interface called JsonParser. It outlines the challenges encountered in this process, such as the need for lookahead when identifying token types and handling character reprocessing for number tokens. The implementation involves using Java's IntStream and iterators, with a specific focus on managing streams of unknown length and converting them into streams of tokens. The article provides a detailed breakdown of the internal workings of the parser, including the handling of whitespace and object names, and demonstrates the parsing process through the use of a Java record serialized into JSON and parsed back into tokens using a series of Java files. The text concludes with an invitation to try Starburst Galaxy's free trial and a note on hiring opportunities for Java enthusiasts.