text:
<?php

namespace NCarolina\FactoryBundle\Services;

use Symfony\Component\DependencyInjection\Container;

class JSONRequest
{

	protected $container;

	public function __construct(Container $container)
	{
		$this->container = $container;
	}

	// Return associative array of information
	public function getJson()
	{
		return json_decode($this->container->get('request')->getContent(),true);
	}
}


text:
package info.jtrac.wicket;

import info.jtrac.domain.Config;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.BoundCompoundPropertyModel;

/**
 * config value edit form
 */
public class ConfigFormPage extends BasePage {
    /**
     * Constructor
     *
     * @param param
     * @param value
     */
    public ConfigFormPage(String param, String value) {
        add(new ConfigForm("form", param, value));
    }

    /**
     * wicket form
     */
    private class ConfigForm extends Form {

        private String param;

        private String value;

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        public ConfigForm(String id, final String param, final String value) {

            super(id);

            this.param = param;
            this.value = value;

            final BoundCompoundPropertyModel model = new BoundCompoundPropertyModel(this);
            setModel(model);

            add(new Label("heading", localize("config." + param)));
            add(new Label("param", param));
            add(new TextField("value"));

            // cancel ==========================================================
            add(new Link("cancel") {
                public void onClick() {
                    setResponsePage(new ConfigListPage(param));
                }
            });
        }

        @Override
        protected void onSubmit() {
            getJtrac().storeConfig(new Config(param, value));
            setResponsePage(new ConfigListPage(param));
        }
    }
}

redpajama_set_name: RedPajamaGithub