src/main/java/pl/jalokim/propertiestojson/util/PropertiesToJsonConverter.java
public String convertPropertiesFromFileToJson(File file, String... includeDomainKeys) throws ReadInputException, ParsePropertiesException {
        try {
            InputStream targetStream = new FileInputStream(file);
            return convertToJson(targetStream, includeDomainKeys);
        } catch (FileNotFoundException e) {
            throw new ReadInputException(e);
        }
    }
public String convertPropertiesFromFileToJson(File file, String... includeDomainKeys) throws ReadInputException, ParsePropertiesException {
        try {
            InputStream targetStream = new FileInputStream(file);
            return convertToJson(targetStream, includeDomainKeys);
        } catch (FileNotFoundException e) {
            throw new ReadInputException(e);
        }
    }
public String convertPropertiesFromFileToJson ( File file , String ... includeDomainKeys ) throws ReadInputException , ParsePropertiesException { try { InputStream targetStream = new FileInputStream ( file ) ; return convertToJson ( targetStream , includeDomainKeys ) ; } catch ( FileNotFoundException e ) { throw new ReadInputException ( e ) ; } }
Generate Json by given file with properties with only included domain keys.

@param file              file with properties
@param includeDomainKeys domain head keys which should be parsed to json <br>
example properties:<br>
object1.field1=value1<br>
object1.field2=value2<br>
someObject2.field2=value3<br>
filter "object1"<br>
will parse only nested domain for "object1"<br>
@return simple String with json
@throws ReadInputException       when cannot find file
@throws ParsePropertiesException when structure of properties is not compatible with json structure
Generate Json by given file with properties with only included domain keys .