Code Explainers

Code explainers tagged #json-serialization

go
package handlers
 
import (
	"net/http"

Sparse fieldsets in a Gin handler

sparse-fieldsets query-parsing json-serialization
Intermediate 9 steps
java
public OrderConfirmation submitOrder(Order order) throws IOException, InterruptedException {
    String payload = objectMapper.writeValueAsString(order);
 
    HttpRequest request = HttpRequest.newBuilder()

Posting an order with Java's HttpClient

http-client json-serialization error-handling
Intermediate 6 steps
rust
use axum::{
    extract::{Path, State},
    http::StatusCode,
    routing::get,

Building a JSON user API in Axum

routing shared-state json-serialization
Intermediate 8 steps