protected final boolean writeContentCategory ( String cat , JsonGenerator gen ) throws IOException { if ( ! factory . isStrict ( ) || OpenRtbUtils . categoryFromName ( cat ) != null ) { gen . writeString ( cat ) ; return true ; } else { return false ; } }
Writes a string that represents a ContentCategory s JSON name returning success status . If the factory is in strict mode the category name is validated .