PrivTab

JSON به ساختار Go

JSON به ساختار Go

در مرورگر شما اجرا می‌شود · بدون بارگذاری

این ابزار و راهنمای این صفحه فعلاً به زبان انگلیسی است. عملکردش همان است: همه چیز در مرورگر شما اجرا می‌شود.

Generate Go

  • هیچ چیز از دستگاه شما خارج نمی‌شود
  • بدون محدودیت حجم از سوی سرور
  • بدون ثبت‌نام، بدون واترمارک
  • رایگان

How to convert JSON to Go

  1. Paste your JSON, or try the example.
  2. Choose omitempty and pointers for nullable fields.
  3. Copy or download the Go code.

What you get

  • A struct for every object, with fields lined up as gofmt does.
  • Go names with common initialisms (ID, URL, HTTP, JSON) and json tags with the original keys.
  • int64 for whole numbers and float64 for decimals.
  • omitempty for fields missing from some items, and *T for fields that can be null.

پرسش‌های رایج

Is my JSON uploaded?

No. Everything happens in your browser, and the page is blocked from uploading anything.