public class MatrixTransformer extends ParameterTransformer
+--------+---------+--------+-------------+-------------------------------------+--------------------------+ | style | explode | empty | string | array | object | +--------+---------+--------+-------------+-------------------------------------+--------------------------+ | matrix | false | ;color | ;color=blue | ;color=blue,black,brown | ;color=R,100,G,200,B,150 | +--------+---------+--------+-------------+-------------------------------------+--------------------------+ | matrix | true | ;color | ;color=blue | ;color=blue;color=black;color=brown | ;R=100;G=200;B=150 | +--------+---------+--------+-------------+-------------------------------------+--------------------------+
Constructor and Description |
---|
MatrixTransformer() |
Modifier and Type | Method and Description |
---|---|
protected String[] |
getArrayValues(Parameter parameter,
String rawValue) |
protected String[] |
getObjectKeysAndValues(Parameter parameter,
String rawValue) |
Object |
transform(Parameter parameter,
String rawValue)
Transforms the raw value from its
String representation into JSON. |
transformArray, transformObject, transformPrimitive
public Object transform(Parameter parameter, String rawValue)
ParameterTransformer
String
representation into JSON. This method does not only decode a
String
, it also takes the different styles
into account}.transform
in class ParameterTransformer
parameter
- The parameter modelrawValue
- The parameter valueObject
holding the transformed value.protected String[] getArrayValues(Parameter parameter, String rawValue)
getArrayValues
in class ParameterTransformer
protected String[] getObjectKeysAndValues(Parameter parameter, String rawValue)
getObjectKeysAndValues
in class ParameterTransformer
Copyright © 2024 Eclipse. All rights reserved.