org.apache.juneau.uon.ParamFormat Maven / Gradle / Ivy
// ***************************************************************************************************************************
// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
// * with the License. You may obtain a copy of the License at *
// * *
// * http://www.apache.org/licenses/LICENSE-2.0 *
// * *
// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
package org.apache.juneau.uon;
/**
* Identifies the possible values for the {@link UonSerializer#UON_paramFormat} setting.
*/
public enum ParamFormat {
/**
* Use UON notation for values.
*
*
* String values such as "(foo='bar')" will end up being quoted and escaped to "'(foo=bar~'baz~')'" .
*
*
* Boolean strings ("true" /"false" ) and numeric values ("123" ) will also end up quoted
* ("'true'" , "'false'" , "'123'" .
*/
UON,
/**
* Serialize as plain text.
*
*
* Strings will never be quoted or escaped.
*
*
* Note that this can cause errors during parsing if you're using the URL-encoding parser to parse the results since
* UON constructs won't be differentiable.
* However, this is not an issue if you're simply creating queries or form posts against 3rd-party interfaces.
*/
PLAINTEXT;
}