Best practice to pass large pipeline option in apache beam

You can pass the options as a POJO.

public class JsonSpec {
    public String stringArg;
    public int intArg;
}

Then reference in your options

public interface CustomPipelineOptions extends PipelineOptions {
    @Description("The Json spec")
    JsonSpec getJsonSpec();
    void setJsonSpec(JsonSpec jsonSpec);
}

Options will be parsed to the class; I believe by Jackson though not sure.

I am wondering why you want to pass in "hundreds of lines of JSON" as a pipeline option? This doesn't seem like a very "Beam" way of doing things. Pipeline options should pass configuration; do you really need hundreds of lines of configuration per pipeline run? If you intend to pass data to create a PCollection then better off using TextIO and then processing lines as JSON.