JSON നിന്ന് TypeScript
നെസ്റ്റഡ് ഒബ്ജക്റ്റുകൾ, അറേകൾ, ഓപ്ഷണൽ ഫീൽഡുകൾ എന്നിവ കണ്ടെത്തി സാമ്പിൾ JSON-നെ TypeScript ഇന്റർഫേസുകളോ ടൈപ്പ് അലിയാസുകളോ ആക്കുക.
അപ്ലോഡ് ഇല്ല
export interface Root {
id: number;
name: string;
email: string;
active: boolean;
tags: string[];
address: Address;
orders: Order[];
}
export interface Order {
id: string;
total: number;
coupon?: string;
}
export interface Address {
city: string;
zip: null;
} JSON നിന്ന് TypeScript എങ്ങനെ ഉപയോഗിക്കാം
- 1JSON നിന്ന് TypeScript തുറക്കുക. ഇത് നിങ്ങളുടെ ബ്രൗസറിൽ പ്രവർത്തിക്കുന്നു, സൈൻ-അപ്പ് വേണ്ട.
- 2നിങ്ങളുടെ ഇൻപുട്ട് ടൈപ്പ് ചെയ്യുക അല്ലെങ്കിൽ പേസ്റ്റ് ചെയ്യുക.
- 3ഫലം കോപ്പി ചെയ്യുക അല്ലെങ്കിൽ ഡൗൺലോഡ് ചെയ്യുക.
ചോദ്യങ്ങൾ
How are optional fields detected?
When an array contains objects and a key is missing from some of them, that key is marked optional with ?.
What about null values?
null is kept in a union, e.g. string | null, so you can see which fields can be empty.
Is my JSON uploaded?
No — conversion happens entirely in your browser.
കൂടുതൽ ടൂളുകൾ
JSON ഫോർമാറ്ററും വാലിഡേറ്ററുംഭംഗിയാക്കുക, ചുരുക്കുക, പരിശോധിക്കുക Base64 എൻകോഡർ, ഡീകോഡർടെക്സ്റ്റും ഫയലുകളും ഹാഷ് ജനറേറ്റർMD5, SHA-1, SHA-256, SHA-512 പാസ്വേഡ്, UUID ജനറേറ്റർശക്തം, റാൻഡം, ലോക്കൽ Regex ടെസ്റ്റർലൈവ് മാച്ചുകളും ഗ്രൂപ്പുകളും JWT ഡീകോഡർഹെഡർ, പേലോഡ്, കാലാവധി ഡിഫ് ചെക്കർരണ്ട് ടെക്സ്റ്റുകൾ താരതമ്യം CSV ↔ JSON ↔ YAML ↔ XMLഡാറ്റ ഫോർമാറ്റുകൾ മാറ്റുക