Skip to main content

الوسائط

any
مطلوب
Value يتم encode و decode لها. Supported JSON values تعمل round-trip عبر JSON؛ unsupported types تتحول إلى null إلا إذا طلبت encode options خطأ.
EncodeOptions
Optional encode options تمرر إلى encode step، مثل sortKeys و emptyTableAsArray و errorOnUnsupported و encodeInvalidNumbersAsNull و maxDepth و pretty و indent.

القيم الراجعة

any
Decoded value الناتجة من encoded JSON. Objects و arrays تصبح new tables مع JSON kind markers من decoder؛ JSON null values تتحول إلى json.null.

الأنواع

EncodeOptions

يتحكم في تسلسل JSON وتنسيقه.

مثال

اعمل round-trip لقيمة JSON-compatible عبر json.encode و json.decode قبل تغيير nested values.