class PrimitiveSerializationHandles {

    public static SerializationHandle<Nothing> NULL_HANDLE = new SerializationHandle<Nothing>() {

        @Override
        public <I> Nothing deserialize(DeserializationAdapter<I> adapter, I input) throws IOException {
            return null;
        }

        @Override
        public <O> void serialize(SerializationAdapter<O> adapter, O output, Nothing serializableObject, Version backwardCompatibilityVersion, Scope scope) throws IOException {

        }

        @Override
        public int getTypeId() {
            return 0;
        }

        @Override
        public Class<Nothing> getSerializedType() {
            return Nothing.class;
        }

        @Override
        public Nothing fromJsonCompatibleSnapshot(Map<String, Object> snapshot) {
            return Nothing.INSTANCE;
        }

        @Override
        public Map<String, Object> toJsonCompatibleSnapshot(Nothing serializableObject, Version backwardCompatibilityVersion, Scope scope) {
            return new HashMap<>();
        }

        @Override
        public String getTypeName() {
            return "Nothing";
        }
    };

    public static SerializationHandle<Long> LONG_HANDLE = new SerializationHandle<Long>() {
        @Override
        public <I> Long deserialize(DeserializationAdapter<I> adapter, I input) throws IOException {
            return adapter.readLong(input);
        }

        @Override
        public <O> void serialize(SerializationAdapter<O> adapter, O output, Long value, Version backwardCompatibilityVersion, Scope scope) throws IOException {
            adapter.writeLong(output, value);
        }

        @Override
        public int getTypeId() {
            return -1;
        }

        @Override
        public Class<Long> getSerializedType() {
            return Long.TYPE;
        }

        @Override
        public Long fromJsonCompatibleSnapshot(Map<String, Object> snapshot) {
            return readLongValue(snapshot, "value");
        }

        @Override
        public Map<String, Object> toJsonCompatibleSnapshot(Long serializableObject, Version backwardCompatibilityVersion, Scope scope) {<FILL_FUNCTION_BODY>}

        @Override
        public String getTypeName() {
            return "Long";
        }
    };

    public static SerializationHandle<Boolean> BOOLEAN_HANDLE = new SerializationHandle<Boolean>() {
        @Override
        public <I> Boolean deserialize(DeserializationAdapter<I> adapter, I input) throws IOException {
            return adapter.readBoolean(input);
        }

        @Override
        public <O> void serialize(SerializationAdapter<O> adapter, O output, Boolean value, Version backwardCompatibilityVersion, Scope scope) throws IOException {
            adapter.writeBoolean(output, value);
        }

        @Override
        public int getTypeId() {
            return -2;
        }

        @Override
        public Class<Boolean> getSerializedType() {
            return Boolean.TYPE;
        }

        @Override
        public Boolean fromJsonCompatibleSnapshot(Map<String, Object> snapshot) {
            return (Boolean) snapshot.get("value");
        }

        @Override
        public Map<String, Object> toJsonCompatibleSnapshot(Boolean serializableObject, Version backwardCompatibilityVersion, Scope scope) {
            Map<String, Object> result = new HashMap<>();
            result.put("value", serializableObject);
            return result;
        }

        @Override
        public String getTypeName() {
            return "Boolean";
        }
    };

    public static final SerializationHandle[] primitiveHandlesById = new SerializationHandle[] {
            NULL_HANDLE,
            LONG_HANDLE,
            BOOLEAN_HANDLE
    };

}

            Map<String, Object> result = new HashMap<>();
            result.put("value", serializableObject);
            return result;
        
<no_super_class>