org.apache.tamaya.json

## Class JSONPropertySource

- java.lang.Object
- - org.apache.tamaya.json.JSONPropertySource

- All Implemented Interfaces:
    PropertySource

      public class JSONPropertySource
      extends Object
      implements PropertySource

  Property source based on a JSON file.

- - ### Field Summary

    - ### Fields inherited from interface org.apache.tamaya.spi.PropertySource

      `TAMAYA_ORDINAL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JSONPropertySource(URL resource)` Constructor, hereby using 0 as the default ordinal.
    `JSONPropertySource(URL resource, int defaultOrdinal)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `get(String key)`
    `String` | `getName()`
    `int` | `getOrdinal()`
    `Map<String,String>` | `getProperties()`
    `boolean` | `isScannable()`
    `protected Map<String,String>` | `readConfig(URL urlResource)` Reads the configuration.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JSONPropertySource

          public JSONPropertySource(URL resource)

      Constructor, hereby using 0 as the default ordinal.
      Parameters:
        `resource` - the resource modelled as URL, not null.

    - #### JSONPropertySource

          public JSONPropertySource(URL resource,
                                    int defaultOrdinal)

      Constructor.
      Parameters:
        `resource` - the resource modelled as URL, not null.
        `defaultOrdinal` - the defaultOrdinal to be used.

  - ### Method Detail

    - #### getOrdinal

          public int getOrdinal()

      Specified by:
        `getOrdinal` in interface `PropertySource`

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `PropertySource`

    - #### get

          public String get(String key)

      Specified by:
        `get` in interface `PropertySource`

    - #### getProperties

          public Map<String,String> getProperties()

      Specified by:
        `getProperties` in interface `PropertySource`

    - #### readConfig

          protected Map<String,String> readConfig(URL urlResource)

      Reads the configuration.

    - #### isScannable

          public boolean isScannable()

      Specified by:
        `isScannable` in interface `PropertySource`

Copyright © 2015 Apache Software Foundation. All rights reserved.