changed classpath file api to path resource to make it generic
added path resource json support