com.versioneye.utils
Class JsonUtils

java.lang.Object
  extended by com.versioneye.utils.JsonUtils

public class JsonUtils
extends Object

Methods to deal with JSON.


Constructor Summary
JsonUtils()
           
 
Method Summary
 ByteArrayOutputStream artifactsToJson(List<org.eclipse.aether.artifact.Artifact> directDependencies)
           
 ByteArrayOutputStream dependenciesToJson(String name, List<org.apache.maven.model.Dependency> dependencies)
           
 void dependenciesToJsonFile(String name, List<org.eclipse.aether.artifact.Artifact> directDependencies, String file)
           
static List<Map<String,Object>> generateHashForJsonOutput(List<org.eclipse.aether.artifact.Artifact> input)
           
static List<Map<String,Object>> generateHashFromDependencyList(List<org.apache.maven.model.Dependency> input)
           
 List<Map<String,Object>> getDependencyHashes(List<org.apache.maven.model.Dependency> directDependencies)
           
 List<Map<String,Object>> getHashes(List<org.eclipse.aether.artifact.Artifact> directDependencies)
           
static void toJson(OutputStream output, Object input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonUtils

public JsonUtils()
Method Detail

dependenciesToJson

public ByteArrayOutputStream dependenciesToJson(String name,
                                                List<org.apache.maven.model.Dependency> dependencies)
                                         throws Exception
Throws:
Exception

artifactsToJson

public ByteArrayOutputStream artifactsToJson(List<org.eclipse.aether.artifact.Artifact> directDependencies)
                                      throws Exception
Throws:
Exception

dependenciesToJsonFile

public void dependenciesToJsonFile(String name,
                                   List<org.eclipse.aether.artifact.Artifact> directDependencies,
                                   String file)
                            throws Exception
Throws:
Exception

toJson

public static void toJson(OutputStream output,
                          Object input)
                   throws Exception
Throws:
Exception

getHashes

public List<Map<String,Object>> getHashes(List<org.eclipse.aether.artifact.Artifact> directDependencies)

getDependencyHashes

public List<Map<String,Object>> getDependencyHashes(List<org.apache.maven.model.Dependency> directDependencies)

generateHashForJsonOutput

public static List<Map<String,Object>> generateHashForJsonOutput(List<org.eclipse.aether.artifact.Artifact> input)

generateHashFromDependencyList

public static List<Map<String,Object>> generateHashFromDependencyList(List<org.apache.maven.model.Dependency> input)


Copyright © 2014. All rights reserved.