About 50 results
Open links in new tab
  1. Which JSON content type do I use? - Stack Overflow

    JSON is a domain-specific language (DSL) and a data format independent of JavaScript, and as such has its own MIME type, application/json. Respect for MIME types is of course client driven, so …

  2. Importing JSON file in TypeScript - Stack Overflow

    Apr 24, 2018 · First, make sure your new typings.d.ts location is the same as with the include property in your tsconfig.json file. If you don't have an include property in your tsconfig.json file.

  3. What is JSON and what is it used for? - Stack Overflow

    679 JSON (JavaScript Object Notation) is a lightweight format that is used for data interchanging. It is based on a subset of JavaScript language (the way objects are built in JavaScript). As stated in the …

  4. Why is 'type: module' in package.json file? - Stack Overflow

    Apr 24, 2020 · The "type" field defines the module format that Node.js uses for all .js files that have that package.json file as their nearest parent. Files ending with .js are loaded as ES modules when the …

  5. Adding a type definition for a JSON file in typescript

    Typescript will not validate your json. It only works in .ts and .tsx files. What your d.ts there will do is assume that the data imported from config.json conforms to your type, but it will not actually ensure …

  6. How to read an external local JSON file in JavaScript?

    451 I have saved a JSON file in my local system and created a JavaScript file in order to read the JSON file and print data out. Here is the JSON file:

  7. HTTP Content-Type Header and JSON - Stack Overflow

    The Content-Type header is just used as info for your application. The browser doesn't care what it is. The browser just returns you the data from the AJAX call. If you want to parse it as JSON, you need …

  8. typescript - Importing JSON as a type - Stack Overflow

    Well, you can create a file like ./data.json.d.ts containing declare const data: Data; export default data; then you can set a paths entry "*/data.json": ["data.json"] which would work for a non-relative import …

  9. rest - How do I POST JSON data with cURL? - Stack Overflow

    I use Ubuntu and installed cURL on it. I want to test my Spring REST application with cURL. I wrote my POST code at the Java side. However, I want to test it with cURL. I am trying to post a JSON d...

  10. How to load a JSON file and convert it to an object of a specific type?

    Mar 8, 2016 · 71 I have a type FooObject and I have a JSON file which was serialized from a FooObject instance. Now I want to use ConvertFrom-Json to load the JSON file to memory and covert the …