001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.marshall.serializer; 018 019import static java.lang.annotation.ElementType.*; 020import static java.lang.annotation.RetentionPolicy.*; 021 022import java.lang.annotation.*; 023import java.net.*; 024import java.nio.charset.*; 025 026import org.apache.juneau.marshall.*; 027import org.apache.juneau.marshall.parser.*; 028 029/** 030 * Annotation for specifying config properties defined in {@link Serializer}, {@link OutputStreamSerializer}, and {@link WriterSerializer}. 031 * 032 * <p> 033 * Used primarily for specifying bean configuration properties on REST classes and methods. 034 * 035 * <h5 class='section'>See Also:</h5><ul> 036 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/SerializersAndParsers">Serializers and Parsers</a> 037 * </ul> 038 */ 039@Target({ TYPE, METHOD }) 040@Retention(RUNTIME) 041@Inherited 042@ContextApply({ SerializerConfigAnnotation.SerializerApply.class, SerializerConfigAnnotation.OutputStreamSerializerApply.class, SerializerConfigAnnotation.WriterSerializerApply.class }) 043public @interface SerializerConfig { 044 045 /** 046 * Add <js>"_type"</js> properties when needed. 047 * 048 * <p> 049 * If <js>"true"</js>, then <js>"_type"</js> properties will be added to beans if their type cannot be inferred 050 * through reflection. 051 * 052 * <p> 053 * This is used to recreate the correct objects during parsing if the object types cannot be inferred. 054 * <br>For example, when serializing a <c>Map<String,Object></c> field where the bean class cannot be determined from 055 * the type of the values. 056 * 057 * <p> 058 * Note the differences between the following settings: 059 * <ul> 060 * <li class='jm'>{@link Serializer.Builder#addRootType()} - Affects whether <js>'_type'</js> is added to root node. 061 * <li class='jm'>{@link Serializer.Builder#addBeanTypes()} - Affects whether <js>'_type'</js> is added to any nodes. 062 * </ul> 063 * 064 * <ul class='values'> 065 * <li><js>"true"</js> 066 * <li><js>"false"</js> (default) 067 * </ul> 068 * 069 * <h5 class='section'>Notes:</h5><ul> 070 * <li class='note'> 071 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 072 * </ul> 073 * 074 * <h5 class='section'>See Also:</h5><ul> 075 * <li class='jm'>{@link Serializer.Builder#addBeanTypes()} 076 * </ul> 077 * 078 * @return The annotation value. 079 */ 080 String addBeanTypes() default ""; 081 082 /** 083 * Add type attribute to root nodes. 084 * 085 * <p> 086 * When disabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level 087 * type information that might normally be included to determine the data type will not be serialized. 088 * 089 * <p> 090 * For example, when serializing a top-level POJO with a {@link Marshalled#typeName() @Marshalled(typeName)} value, a 091 * <js>'_type'</js> attribute will only be added when this setting is enabled. 092 * 093 * <p> 094 * Note the differences between the following settings: 095 * <ul> 096 * <li class='jm'>{@link Serializer.Builder#addRootType()} - Affects whether <js>'_type'</js> is added to root node. 097 * <li class='jm'>{@link Serializer.Builder#addBeanTypes()} - Affects whether <js>'_type'</js> is added to any nodes. 098 * </ul> 099 * 100 * <ul class='values'> 101 * <li><js>"true"</js> 102 * <li><js>"false"</js> (default) 103 * </ul> 104 * 105 * <h5 class='section'>Notes:</h5><ul> 106 * <li class='note'> 107 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 108 * </ul> 109 * 110 * <h5 class='section'>See Also:</h5><ul> 111 * <li class='jm'>{@link Serializer.Builder#addRootType()} 112 * </ul> 113 * 114 * @return The annotation value. 115 */ 116 String addRootType() default ""; 117 118 /** 119 * Binary output format. 120 * 121 * <p> 122 * When using the {@link OutputStreamSerializer#writeToString(Object)} method on stream-based serializers, this defines the format to use 123 * when converting the resulting byte array to a string. 124 * 125 * <ul class='values'> 126 * <li><js>"SPACED_HEX"</js> 127 * <li><js>"HEX"</js> (default) 128 * <li><js>"BASE64"</js> 129 * </ul> 130 * 131 * <h5 class='section'>Notes:</h5><ul> 132 * <li class='note'> 133 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 134 * </ul> 135 * 136 * <h5 class='section'>See Also:</h5><ul> 137 * <li class='jm'>{@link OutputStreamSerializer.Builder#binaryFormat(BinaryFormat)} 138 * </ul> 139 * 140 * @return The annotation value. 141 */ 142 String binaryFormat() default ""; 143 144 /** 145 * Automatically detect POJO recursions. 146 * 147 * <p> 148 * Specifies that recursions should be checked for during traversal. 149 * 150 * <p> 151 * Recursions can occur when traversing models that aren't true trees but rather contain loops. 152 * <br>In general, unchecked recursions cause stack-overflow-errors. 153 * <br>These show up as {@link ParseException ParseExceptions} with the message <js>"Depth too deep. Stack overflow occurred."</js>. 154 * 155 * <p> 156 * The behavior when recursions are detected depends on the value for {@link org.apache.juneau.marshall.MarshallingTraverseContext.Builder#ignoreRecursions() MarshallingTraverseContext.Builder#ignoreRecursions()}. 157 * 158 * <p> 159 * For example, if a model contains the links A->B->C->A, then the JSON generated will look like 160 * the following when <jsf>BEANTRAVERSE_ignoreRecursions</jsf> is <jk>true</jk>... 161 * 162 * <p class='bjson'> 163 * {A:{B:{C:<jk>null</jk>}}} 164 * </p> 165 * 166 * <ul class='values'> 167 * <li><js>"true"</js> 168 * <li><js>"false"</js> (default) 169 * </ul> 170 * 171 * <h5 class='section'>Notes:</h5><ul> 172 * <li class='warn'> 173 * Checking for recursion can cause a small performance penalty. 174 * <li class='note'> 175 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 176 * </ul> 177 * 178 * <h5 class='section'>See Also:</h5><ul> 179 * <li class='jm'>{@link org.apache.juneau.marshall.MarshallingTraverseContext.Builder#detectRecursions() MarshallingTraverseContext.Builder#detectRecursions()} 180 * </ul> 181 * 182 * @return The annotation value. 183 */ 184 String detectRecursions() default ""; 185 186 /** 187 * Ignore recursion errors. 188 * 189 * <p> 190 * Used in conjunction with {@link org.apache.juneau.marshall.MarshallingTraverseContext.Builder#detectRecursions() MarshallingTraverseContext.Builder#detectRecursions()}. 191 * <br>Setting is ignored if <jsf>BEANTRAVERSE_detectRecursions</jsf> is <js>"false"</js>. 192 * 193 * <p> 194 * If <js>"true"</js>, when we encounter the same object when traversing a tree, we set the value to <jk>null</jk>. 195 * <br>Otherwise, a {@link MarshallingRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>. 196 * 197 * <ul class='values'> 198 * <li><js>"true"</js> 199 * <li><js>"false"</js> (default) 200 * </ul> 201 * 202 * <h5 class='section'>Notes:</h5><ul> 203 * <li class='note'> 204 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 205 * </ul> 206 * 207 * <h5 class='section'>See Also:</h5><ul> 208 * <li class='jm'>{@link org.apache.juneau.marshall.MarshallingTraverseContext.Builder#ignoreRecursions() MarshallingTraverseContext.Builder#ignoreRecursions()} 209 * </ul> 210 * 211 * @return The annotation value. 212 */ 213 String ignoreRecursions() default ""; 214 215 /** 216 * Initial depth. 217 * 218 * <p> 219 * The initial indentation level at the root. 220 * <br>Useful when constructing document fragments that need to be indented at a certain level. 221 * 222 * <h5 class='section'>Notes:</h5><ul> 223 * <li class='note'> 224 * Format: integer 225 * <li class='note'> 226 * Default value: <js>"0"</js> 227 * <li class='note'> 228 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 229 * </ul> 230 * 231 * <h5 class='section'>See Also:</h5><ul> 232 * <li class='jm'>{@link org.apache.juneau.marshall.MarshallingTraverseContext.Builder#initialDepth(int) MarshallingTraverseContext.Builder#initialDepth(int)} 233 * </ul> 234 * 235 * @return The annotation value. 236 */ 237 String initialDepth() default ""; 238 239 /** 240 * Don't trim null bean property values. 241 * 242 * <p> 243 * If <js>"true"</js>, null bean values will be serialized to the output. 244 * 245 * <p> 246 * Note that not enabling this setting has the following effects on parsing: 247 * <ul class='spaced-list'> 248 * <li> 249 * Map entries with <jk>null</jk> values will be lost. 250 * </ul> 251 * 252 * <ul class='values'> 253 * <li><js>"true"</js> 254 * <li><js>"false"</js> (default) 255 * </ul> 256 * 257 * <h5 class='section'>Notes:</h5><ul> 258 * <li class='note'> 259 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 260 * </ul> 261 * 262 * <h5 class='section'>See Also:</h5><ul> 263 * <li class='jm'>{@link Serializer.Builder#keepNullProperties()} 264 * </ul> 265 * 266 * @return The annotation value. 267 */ 268 String keepNullProperties() default ""; 269 270 /** 271 * Serializer listener. 272 * 273 * <p> 274 * Class used to listen for errors and warnings that occur during serialization. 275 * 276 * <h5 class='section'>See Also:</h5><ul> 277 * <li class='jm'>{@link Serializer.Builder#listener(Class)} 278 * </ul> 279 * 280 * @return The annotation value. 281 */ 282 Class<? extends SerializerListener> listener() default SerializerListener.Void.class; 283 284 /** 285 * Max traversal depth. 286 * 287 * <p> 288 * Abort traversal if specified depth is reached in the POJO tree. 289 * <br>If this depth is exceeded, an exception is thrown. 290 * 291 * <h5 class='section'>Notes:</h5><ul> 292 * <li class='note'> 293 * Format: integer 294 * <li class='note'> 295 * Default value: <js>"100"</js> 296 * <li class='note'> 297 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 298 * </ul> 299 * 300 * <h5 class='section'>See Also:</h5><ul> 301 * <li class='jm'>{@link org.apache.juneau.marshall.MarshallingTraverseContext.Builder#maxDepth(int) MarshallingTraverseContext.Builder#maxDepth(int)} 302 * </ul> 303 * 304 * @return The annotation value. 305 */ 306 String maxDepth() default ""; 307 308 /** 309 * Maximum indentation. 310 * 311 * <p> 312 * Specifies the maximum indentation level in the serialized document. 313 * 314 * <h5 class='section'>Notes:</h5><ul> 315 * <li class='note'> 316 * Format: integer 317 * <li class='note'> 318 * Default: 100 319 * <li class='note'> 320 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 321 * <li class='note'> 322 * This setting does not apply to the RDF serializers. 323 * </ul> 324 * 325 * <h5 class='section'>See Also:</h5><ul> 326 * <li class='jm'>{@link WriterSerializer.Builder#maxIndent(int)} 327 * </ul> 328 * 329 * @return The annotation value. 330 */ 331 String maxIndent() default ""; 332 333 /** 334 * Don't serialize properties whose value equals the type default. 335 * 336 * <p> 337 * If <js>"true"</js>, bean properties whose current value equals the corresponding default — the Java type default 338 * for primitives/boxed types, or the value returned by the bean's own no-arg constructor for bean properties — will 339 * be omitted from the output. This is Juneau's analog of Jackson's 340 * <c>JsonInclude.Include.NON_DEFAULT</c>. 341 * 342 * <p> 343 * Numeric values are compared by value (<c>1.0</c> equals <c>1</c>; <c>0.0</c> equals <c>-0.0</c>). 344 * 345 * <ul class='values'> 346 * <li><js>"true"</js> 347 * <li><js>"false"</js> (default) 348 * </ul> 349 * 350 * <h5 class='section'>Notes:</h5><ul> 351 * <li class='note'> 352 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 353 * </ul> 354 * 355 * <h5 class='section'>See Also:</h5><ul> 356 * <li class='jm'>{@link Serializer.Builder#nonDefault()} 357 * </ul> 358 * 359 * @return The annotation value. 360 * @since 10.0.0 361 */ 362 String nonDefault() default ""; 363 364 /** 365 * Quote character. 366 * 367 * <p> 368 * This is the character used for quoting attributes and values. 369 * 370 * <h5 class='section'>Notes:</h5><ul> 371 * <li class='note'> 372 * Default: <c>"</c> 373 * <li class='note'> 374 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 375 * <li class='note'> 376 * This setting does not apply to the RDF serializers. 377 * </ul> 378 * 379 * <h5 class='section'>See Also:</h5><ul> 380 * <li class='jm'>{@link WriterSerializer.Builder#quoteChar(char)} 381 * </ul> 382 * 383 * @return The annotation value. 384 */ 385 String quoteChar() default ""; 386 387 /** 388 * Optional rank for this config. 389 * 390 * <p> 391 * Can be used to override default ordering and application of config annotations. 392 * 393 * @return The annotation value. 394 */ 395 int rank() default 0; 396 397 /** 398 * Sort arrays and collections alphabetically. 399 * 400 * <p> 401 * Copies and sorts the contents of arrays and collections before serializing them. 402 * 403 * <p> 404 * Note that this introduces a performance penalty. 405 * 406 * <ul class='values'> 407 * <li><js>"true"</js> 408 * <li><js>"false"</js> (default) 409 * </ul> 410 * 411 * <h5 class='section'>Notes:</h5><ul> 412 * <li class='note'> 413 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 414 * </ul> 415 * 416 * <h5 class='section'>See Also:</h5><ul> 417 * <li class='jm'>{@link Serializer.Builder#sortCollections()} 418 * </ul> 419 * 420 * @return The annotation value. 421 */ 422 String sortCollections() default ""; 423 424 /** 425 * Sort maps alphabetically. 426 * 427 * <p> 428 * Copies and sorts the contents of maps by their keys before serializing them. 429 * 430 * <p> 431 * Note that this introduces a performance penalty. 432 * 433 * <ul class='values'> 434 * <li><js>"true"</js> 435 * <li><js>"false"</js> (default) 436 * </ul> 437 * 438 * <h5 class='section'>Notes:</h5><ul> 439 * <li class='note'> 440 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 441 * </ul> 442 * 443 * <h5 class='section'>See Also:</h5><ul> 444 * <li class='jm'>{@link Serializer.Builder#sortMaps()} 445 * </ul> 446 * 447 * @return The annotation value. 448 */ 449 String sortMaps() default ""; 450 451 /** 452 * Output stream charset. 453 * 454 * <p> 455 * The character set to use when writing to OutputStreams. 456 * 457 * <p> 458 * Used when passing in output streams and byte arrays to {@link WriterSerializer#write(Object, Object)}. 459 * 460 * <h5 class='section'>Notes:</h5><ul> 461 * <li class='note'> 462 * Format: string 463 * <li class='note'> 464 * Default: <js>"utf-8"</js>. 465 * <li class='note'> 466 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 467 * <li class='note'> 468 * This setting does not apply to the RDF serializers. 469 * </ul> 470 * 471 * <h5 class='section'>See Also:</h5><ul> 472 * <li class='jm'>{@link WriterSerializer.Builder#streamCharset(Charset)} 473 * </ul> 474 * 475 * @return The annotation value. 476 */ 477 String streamCharset() default ""; 478 479 /** 480 * Trim empty lists and arrays. 481 * 482 * <p> 483 * If <js>"true"</js>, empty lists and arrays will not be serialized. 484 * 485 * <p> 486 * Note that enabling this setting has the following effects on parsing: 487 * <ul class='spaced-list'> 488 * <li> 489 * Map entries with empty list values will be lost. 490 * <li> 491 * Bean properties with empty list values will not be set. 492 * </ul> 493 * 494 * <ul class='values'> 495 * <li><js>"true"</js> 496 * <li><js>"false"</js> (default) 497 * </ul> 498 * 499 * <h5 class='section'>Notes:</h5><ul> 500 * <li class='note'> 501 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 502 * </ul> 503 * 504 * <h5 class='section'>See Also:</h5><ul> 505 * <li class='jm'>{@link Serializer.Builder#trimEmptyCollections()} 506 * </ul> 507 * 508 * @return The annotation value. 509 */ 510 String trimEmptyCollections() default ""; 511 512 /** 513 * Trim empty maps. 514 * 515 * <p> 516 * If <js>"true"</js>, empty map values will not be serialized to the output. 517 * 518 * <p> 519 * Note that enabling this setting has the following effects on parsing: 520 * <ul class='spaced-list'> 521 * <li> 522 * Bean properties with empty map values will not be set. 523 * </ul> 524 * 525 * <ul class='values'> 526 * <li><js>"true"</js> 527 * <li><js>"false"</js> (default) 528 * </ul> 529 * 530 * <h5 class='section'>Notes:</h5><ul> 531 * <li class='note'> 532 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 533 * </ul> 534 * 535 * <h5 class='section'>See Also:</h5><ul> 536 * <li class='jm'>{@link Serializer.Builder#trimEmptyMaps()} 537 * </ul> 538 * 539 * @return The annotation value. 540 */ 541 String trimEmptyMaps() default ""; 542 543 /** 544 * Trim strings. 545 * 546 * <p> 547 * If <js>"true"</js>, string values will be trimmed of whitespace using {@link String#trim()} before being serialized. 548 * 549 * <ul class='values'> 550 * <li><js>"true"</js> 551 * <li><js>"false"</js> (default) 552 * </ul> 553 * 554 * <h5 class='section'>Notes:</h5><ul> 555 * <li class='note'> 556 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 557 * </ul> 558 * 559 * <h5 class='section'>See Also:</h5><ul> 560 * <li class='jm'>{@link Serializer.Builder#trimStrings()} 561 * </ul> 562 * 563 * @return The annotation value. 564 */ 565 String trimStrings() default ""; 566 567 /** 568 * URI context bean. 569 * 570 * <h5 class='section'>Description:</h5> 571 * <p> 572 * Bean used for resolution of URIs to absolute or root-relative form. 573 * 574 * <h5 class='section'>Notes:</h5><ul> 575 * <li class='note'> 576 * Format: JSON object representing a {@link UriContext} 577 * <li class='note'> 578 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 579 * </ul> 580 * 581 * <h5 class='section'>See Also:</h5><ul> 582 * <li class='jm'>{@link Serializer.Builder#uriContext(UriContext)} 583 * </ul> 584 * 585 * @return The annotation value. 586 */ 587 String uriContext() default ""; 588 589 /** 590 * URI relativity. 591 * 592 * <p> 593 * Defines what relative URIs are relative to when serializing any of the following: 594 * <ul> 595 * <li>{@link URI} 596 * <li>{@link URL} 597 * <li>Properties and classes annotated with {@link Uri @Uri} 598 * </ul> 599 * 600 * <ul class='values'> 601 * <li><js>"RESOURCE"</js> (default) - Relative URIs should be considered relative to the servlet URI. 602 * <li><js>"PATH_INFO"</js> - Relative URIs should be considered relative to the request URI. 603 * </ul> 604 * 605 * <h5 class='section'>Notes:</h5><ul> 606 * <li class='note'> 607 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 608 * </ul> 609 * 610 * <h5 class='section'>See Also:</h5><ul> 611 * <li class='jm'>{@link Serializer.Builder#uriRelativity(UriRelativity)} 612 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshallingUris">URIs</a> 613 * </ul> 614 * 615 * @return The annotation value. 616 */ 617 String uriRelativity() default ""; 618 619 /** 620 * URI resolution. 621 * 622 * <p> 623 * Defines the resolution level for URIs when serializing any of the following: 624 * <ul> 625 * <li>{@link URI} 626 * <li>{@link URL} 627 * <li>Properties and classes annotated with {@link Uri @Uri} 628 * </ul> 629 * 630 * <ul class='values'> 631 * <li><js>"ABSOLUTE"</js> - Resolve to an absolute URL (e.g. <js>"http://host:port/context-root/servlet-path/path-info"</js>). 632 * <li><js>"ROOT_RELATIVE"</js> - Resolve to a root-relative URL (e.g. <js>"/context-root/servlet-path/path-info"</js>). 633 * <li><js>"NONE"</js> (default) - Don't do any URL resolution. 634 * </ul> 635 * 636 * <h5 class='section'>Notes:</h5><ul> 637 * <li class='note'> 638 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 639 * </ul> 640 * 641 * <h5 class='section'>See Also:</h5><ul> 642 * <li class='jm'>{@link Serializer.Builder#uriResolution(UriResolution)} 643 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshallingUris">URIs</a> 644 * </ul> 645 * 646 * @return The annotation value. 647 */ 648 String uriResolution() default ""; 649 650 /** 651 * Use whitespace. 652 * 653 * <p> 654 * If <js>"true"</js>, whitespace is added to the output to improve readability. 655 * 656 * <ul class='values'> 657 * <li><js>"true"</js> 658 * <li><js>"false"</js> (default) 659 * </ul> 660 * 661 * <h5 class='section'>Notes:</h5><ul> 662 * <li class='note'> 663 * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>). 664 * </ul> 665 * 666 * <h5 class='section'>See Also:</h5><ul> 667 * <li class='jm'>{@link WriterSerializer.Builder#useWhitespace()} 668 * </ul> 669 * 670 * @return The annotation value. 671 */ 672 String useWhitespace() default ""; 673}