package api
import (
"encoding/json"
"errors"
"io"
class JsonLogFormatter < ActiveSupport::Logger::SimpleFormatter
def call(severity, timestamp, _progname, message)
if message.is_a?(Hash)
entry = {
ts: timestamp.utc.iso8601(3),
level: severity
package types
import (
"bytes"
"encoding/json"
"time"
package api
import (
"encoding/json"
"errors"
"io"
package api
import (
"net/http"
"strings"
)
class Contract
INVALID = Object.new.freeze
COERCERS = {
string: ->(v) { v.is_a?(String) ? v : v.to_s },
integer: ->(v) { Integer(v.to_s) rescue INVALID },
package api
import (
"encoding/json"
"net/http"
)
from typing import Optional
from pydantic import BaseModel, EmailStr, Field, field_validator, model_validator
class CreateUserRequest(BaseModel):
model_config = {"extra": "forbid"}
package events
import "encoding/json"
type Envelope struct {
Type string `json:"type"`
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
import Foundation
// MARK: - Basic Codable
struct User: Codable {
let id: Int
let username: String
class Problem
DEFAULT_TYPE = "https://api.example.com/problems/about:blank".freeze
attr_reader :type, :title, :status, :detail, :instance, :extensions
def initialize(status:, title:, detail: nil, type: nil, instance: nil, extensions: {})