json: removing Java 8 API usage