All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minidev.json.actions.traverse.KeysPrintAction Maven / Gradle / Ivy

package net.minidev.json.actions.traverse;

import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;

import java.util.Map.Entry;

/**
 * @author [email protected]
 * @since  5/24/16.
 */
public class KeysPrintAction implements JSONTraverseAction {
	@Override
	public boolean start(JSONObject object) {
		return true;
	}

	@Override
	public boolean traverseEntry(String fullPathToEntry, Entry entry) {
		System.out.println(entry.getKey());
		return true;
	}

	@Override
	public boolean recurInto(String pathToEntry, JSONObject entryValue) {
		return true;
	}

	@Override
	public boolean recurInto(String pathToEntry, JSONArray entryValue) {
		return true;
	}

	@Override
	public void handleLeaf(String pathToEntry, Entry entry) {

	}

	@Override
	public void handleLeaf(String fullPathToContainingList, int listIndex, Object listItem) {

	}

	@Override
	public boolean removeEntry(String fullPathToEntry, Entry entry) {
		return false;
	}

	@Override
	public void end() {

	}

	@Override
	public Object result() {
		return null;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy