Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-973

Support for JSON Schema (Code completion, hints, etc.)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Next
    • None
    • javascript - JSON
    • None

    Description

      As we have a lot of JSON files, which has a specific, known structure, like package.json, composer.json, angular-cli.json, angular.json, bower.json and a lot of others, we need the the ability to have code completion inside those files for the specific name. This feature is part of VS Code and IntelliJ and both uses the JSON Schema: http://schemastore.org/json/.

      So as you can see, not only .json files, but .bowerrc or others, should have the functionality too. WebStorm downloads the schema for each file like they described it here: https://blog.jetbrains.com/webstorm/2018/05/webstorm-2018-2-eap/#improved_support_for_json_schemas

      So you can see that they show the properties inside the code completion, that are allowed and the description to each property.

      I know, that we have code completion for composer.json but first it is a mess for the developers, to add each completion provider for each supported json file and new ones. So it would be better to call the API and parse the result, as you already wanted that, many years ago, as described here: http://wiki.netbeans.org/JsonTools#JS_expression -> Advaced features -> JSON validation against JSON Schemas.

      So this enhancement will be very great. And if this is happen, we can have some more features like validation in json files and add missing, required properties: https://blog.jetbrains.com/webstorm/2018/06/webstorm-2018-2-eap-182-3208/#add_missing_required_properties_in_json_files

      Here are some more links from json schema, for the implementation: http://json-schema.org/implementations.html

      Cheers

      Chris

      Attachments

        Activity

          People

            Unassigned Unassigned
            chrizzly Christian Lenz
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: