Skip to content

Commit

Permalink
Add flux annotations
Browse files Browse the repository at this point in the history
See #382.
  • Loading branch information
dr0i committed Aug 26, 2021
1 parent db8f5a1 commit 8761d98
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017 hbz
* Copyright 2017, 2021 hbz
*
* Licensed under the Apache License, Version 2.0 the "License";
* you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,12 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.jsonpath.JsonPath;

import org.metafacture.framework.FluxCommand;
import org.metafacture.framework.MetafactureException;
import org.metafacture.framework.StreamReceiver;
import org.metafacture.framework.annotations.Description;
import org.metafacture.framework.annotations.In;
import org.metafacture.framework.annotations.Out;
import org.metafacture.framework.helpers.DefaultObjectPipe;

import java.io.IOException;
Expand All @@ -37,6 +41,11 @@
* @author Jens Wille
*
*/
@Description("Decodes JSON to metadata events. The \'setRecordPath\' option can be used to set a JsonPath "
+ "to extract a path as JSON - or to split the data into multiple JSON documents.")
@In(String.class)
@Out(StreamReceiver.class)
@FluxCommand("decode-json")
public final class JsonDecoder extends DefaultObjectPipe<String, StreamReceiver> {

public static final String DEFAULT_ARRAY_MARKER = JsonEncoder.ARRAY_MARKER;
Expand Down

0 comments on commit 8761d98

Please sign in to comment.