Package net.obvj.confectory.mapper
Class JsonOrgPropertiesToJSONObjectMapper
- java.lang.Object
-
- net.obvj.confectory.mapper.JsonOrgJSONObjectMapper
-
- net.obvj.confectory.mapper.JsonOrgPropertiesToJSONObjectMapper
-
- All Implemented Interfaces:
Mapper<org.json.JSONObject>
public class JsonOrgPropertiesToJSONObjectMapper extends JsonOrgJSONObjectMapper implements Mapper<org.json.JSONObject>
A specializedMapper
that loads the contents of aSource
(e.g.: file, URL) in theProperties
format (a sequence of key-value pairs) and converts it into aJSONObject
(json.org
reference implementation).This allows fetching the contents using JSONPath expressions.
- Since:
- 2.0.0 (note: since 0.2.0 as
PropertiesToJSONObjectMapper
) - Author:
- oswaldo.bapvic.jr (Oswaldo Junior)
-
-
Constructor Summary
Constructors Constructor Description JsonOrgPropertiesToJSONObjectMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.json.JSONObject
apply(InputStream inputStream)
-
Methods inherited from class net.obvj.confectory.mapper.JsonOrgJSONObjectMapper
configurationHelper
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.obvj.confectory.mapper.Mapper
configurationHelper
-
-
-
-
Method Detail
-
apply
public org.json.JSONObject apply(InputStream inputStream) throws IOException
- Specified by:
apply
in interfaceMapper<org.json.JSONObject>
- Overrides:
apply
in classJsonOrgJSONObjectMapper
- Throws:
IOException
-
-