ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/google/protobuf/json_format.pyo
ó
Š÷hc@sÑdZdZyddlmZWn!ek
rCddlmZnXddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZddlmZdZeejjejjejjejjgƒZeejjejjgƒZeejjejjgƒZd	Zd
ZdZe	j e
j!dƒƒZ"e	j d
ƒZ#de$fd„ƒYZ%de%fd„ƒYZ&de%fd„ƒYZ'e(e(de(d„Z)e(e(d„Z*d„Z+de,fd„ƒYZ-d„Z.d„Z/d„Z0e(d„Z1e(d„Z2e
j3e4fZ5de,fd „ƒYZ6e(d!„Z7d"„Z8d#„Z9d$„Z:id%d&gd'6d(d)gd*6d(d)gd+6d,d-gd.6d/d0gd16d(d)gd26d3d4gd56Z;dS(6stContains routines for printing protocol messages in JSON format.

Simple usage example:

  # Create a proto object and serialize it to a json format string.
  message = my_proto_pb2.MyMessage(foo='bar')
  json_string = json_format.MessageToJson(message)

  # Parse a json format string to proto object.
  message = json_format.Parse(json_string, my_proto_pb2.MyMessage())
sjieluo@google.com (Jie Luo)iÿÿÿÿ(tOrderedDictN(tmethodcaller(t
descriptor(tsymbol_databases%Y-%m-%dT%H:%M:%StInfinitys	-InfinitytNaNsF[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]s\[[a-zA-Z0-9\._]*\]$tErrorcBseZdZRS(s'Top-level module error for json_format.(t__name__t
__module__t__doc__(((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyRPstSerializeToJsonErrorcBseZdZRS(s&Thrown if serialization to JSON fails.(RRR	(((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR
Tst
ParseErrorcBseZdZRS(s Thrown in case of parsing error.(RRR	(((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyRXsicCs"t||ƒ}|j|||ƒS(s_Converts protobuf message to JSON format.

  Args:
    message: The protocol buffers message instance to serialize.
    including_default_value_fields: If True, singular primitive fields,
        repeated fields, and map fields will always be serialized.  If
        False, only serialize non-empty fields.  Singular message fields
        and oneof fields are not affected by this option.
    preserving_proto_field_name: If True, use the original proto field
        names as defined in the .proto file. If False, convert the field
        names to lowerCamelCase.
    indent: The JSON object will be pretty-printed with this indent level.
        An indent level of 0 or negative will only insert newlines.
    sort_keys: If True, then the output will be sorted by field names.

  Returns:
    A string containing the JSON formatted protocol buffer message.
  (t_PrintertToJsonString(tmessagetincluding_default_value_fieldstpreserving_proto_field_nametindentt	sort_keystprinter((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt
MessageToJson\s	cCst||ƒ}|j|ƒS(sÌConverts protobuf message to a dictionary.

  When the dictionary is encoded to JSON, it conforms to proto3 JSON spec.

  Args:
    message: The protocol buffers message instance to serialize.
    including_default_value_fields: If True, singular primitive fields,
        repeated fields, and map fields will always be serialized.  If
        False, only serialize non-empty fields.  Singular message fields
        and oneof fields are not affected by this option.
    preserving_proto_field_name: If True, use the original proto field
        names as defined in the .proto file. If False, convert the field
        names to lowerCamelCase.

  Returns:
    A dict representation of the protocol buffer message.
  (Rt_MessageToJsonObject(RRRR((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt
MessageToDictxs	cCs1|jtjjko0|jjo0|jjƒjS(N(ttypeRtFieldDescriptortTYPE_MESSAGEtmessage_typethas_optionst
GetOptionst	map_entry(tfield((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt_IsMapEntry’sRcBsweZdZeed„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
d„ZRS(s)JSON format printer for protocol message.cCs||_||_dS(N(RR(tselfRR((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt__init__›s	cCs(|j|ƒ}tj|d|d|ƒS(NRR(Rtjsontdumps(R RRRtjs((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR
¡scCsh|j}|j}t|ƒr+|j|ƒS|tkrRtt|d|ƒ|ƒSi}|j||ƒS(sEConverts message to an object according to Proto3 JSON Specification.i(t
DESCRIPTORt	full_namet_IsWrapperMessaget_WrapperMessageToJsonObjectt_WKTJSONMETHODSRt_RegularMessageToJsonObject(R Rtmessage_descriptorR&R$((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR¥s		
cCsÁ|jƒ}y€x“|D]‹\}}|jr7|j}n	|j}t|ƒrÇ|jjd}i}xU|D]M}	t|	tƒr–|	rd}
qœd}
n|	}
|j	|||	ƒ||
<qiW|||<q|j
tjj
krg|D]}|j	||ƒ^qã||<q|jr‹|}|jjƒjr_|jtjjkr_|j
tjjkr_|j}nd|j|f}|j	||ƒ||<q|j	||ƒ||<qW|jr‹|j}
xÑ|
jD]Ã}|j
tjj
krñ|jtjjksÁ|jrqÁn|jr|j}n	|j}||kr0qÁnt|ƒrIi||<qÁ|j
tjj
krkg||<qÁ|j	||jƒ||<qÁWnWn.tk
r¼}tdj|j|ƒƒ‚nX|S(s?Converts normal message according to Proto3 JSON Specification.tvaluettruetfalses[%s.%s]s#Failed to serialize {0} field: {1}.( t
ListFieldsRtnamet	json_nameRRtfields_by_namet
isinstancetboolt_FieldToJsonObjecttlabelRRtLABEL_REPEATEDtis_extensiontcontaining_typeRtmessage_set_wire_formatRRtLABEL_OPTIONALR&RR%tfieldstcpp_typetCPPTYPE_MESSAGEtcontaining_oneoft
default_valuet
ValueErrorR
tformat(R RR$R<RR,R0tv_fieldtjs_maptkeytrecorded_keytktfR+te((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR*°sf		
		
)						

$cCsU|jtjjkr"|j|ƒS|jtjjkr‡|jjj|dƒ}|dk	rb|j
S|jjdkrx|St
dƒ‚nÊ|jtjjkrÎ|jtjjkrÇtj|ƒjdƒS|Snƒ|jtjjkrít|ƒS|jtkrt|ƒS|jtkrQtj|ƒr;|dkr4tStSntj|ƒrQtSn|S(s<Converts field value according to Proto3 JSON Specification.tproto3sKEnum field contains an integer value which can not mapped to an enum value.sutf-8gN(R=RRR>RtCPPTYPE_ENUMt	enum_typetvalues_by_numbertgettNoneR0tfiletsyntaxR
tCPPTYPE_STRINGRt
TYPE_BYTEStbase64t	b64encodetdecodetCPPTYPE_BOOLR4t_INT64_TYPEStstrt_FLOAT_TYPEStmathtisinft
_NEG_INFINITYt	_INFINITYtisnant_NAN(R RR,t
enum_value((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR5õs2


cCs¾|jƒsiStƒ}|j}||d<t|ƒ}|j|jƒ|j}|j}t|ƒr}|j	|ƒ|d<|S|t
kr®tt
|d|ƒ|ƒ|d<|S|j||ƒS(s<Converts Any message according to Proto3 JSON Specification.s@typeR,i(
R/Rttype_urlt_CreateMessageFromTypeUrltParseFromStringR,R%R&R'R(R)RR*(R RR$Rbtsub_messageR+R&((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt_AnyMessageToJsonObjects"		
		cCs
|jƒS(s8Converts message according to Proto3 JSON Specification.(R
(R R((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt_GenericMessageToJsonObject+scCsŽ|jdƒ}|dks'|dkr+dS|dkrG|j|jƒS|dkr_|j}nt||ƒ}|jj|}|j||ƒS(s>Converts Value message according to Proto3 JSON Specification.tkindt
null_valuet
list_valuetstruct_valueN(	t
WhichOneofROt_ListValueMessageToJsonObjectRjRktgetattrR%R2R5(R RtwhichR,toneof_descriptor((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt_ValueMessageToJsonObject1scCs#g|jD]}|j|ƒ^q
S(sBConverts ListValue message according to Proto3 JSON Specification.(tvaluesRq(R RR,((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyRmAscCs;|j}i}x%|D]}|j||ƒ||<qW|S(s?Converts Struct message according to Proto3 JSON Specification.(R<Rq(R RR<tretRE((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt_StructMessageToJsonObjectFs
	
cCs|j|jjd|jƒS(NR,(R5R%R2R,(R R((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR(Ns(RRR	tFalseR!R
RR*R5RfRgRqRmRtR((((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR˜s			E	!					cCs|jjdkS(Nsgoogle/protobuf/wrappers.proto(RPR0(R+((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR'SscCsOi}xB|D]:\}}||kr=tdj|ƒƒ‚n|||<q
W|S(Ns'Failed to load JSON: duplicate key {0}.(RRB(R$tresultR0R,((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt_DuplicateCheckerWscCsttjƒ}|jdƒd}y|jj|ƒ}Wn&tk
r]tdj|ƒƒ‚nX|j|ƒ}|ƒS(Nt/iÿÿÿÿs1Can not find message descriptor by type_url: {0}.(	RtDefaulttsplittpooltFindMessageTypeByNametKeyErrort	TypeErrorRBtGetPrototype(Rbtdbt	type_nameR+t
message_class((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyRc`s
cCsŸt|tjƒs$|jdƒ}ny:tjdkrHtj|ƒ}ntj|dtƒ}Wn.t	k
rŽ}t
djt|ƒƒƒ‚nXt
|||ƒS(sbParses a JSON representation of a protocol message into a message.

  Args:
    text: Message JSON representation.
    message: A protocol buffer message to merge into.
    ignore_unknown_fields: If True, do not raise errors for unknown fields.

  Returns:
    The same message passed as argument.

  Raises::
    ParseError: On JSON parsing problems.
  sutf-8iitobject_pairs_hooksFailed to load JSON: {0}.(ii(R3tsixt	text_typeRVtsystversion_infoR"tloadsRwRARRBRYt	ParseDict(ttextRtignore_unknown_fieldsR$RI((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pytParsenscCs t|ƒ}|j||ƒ|S(s.Parses a JSON dictionary representation into a message.

  Args:
    js_dict: Dict representation of a JSON message.
    message: A protocol buffer message to merge into.
    ignore_unknown_fields: If True, do not raise errors for unknown fields.

  Returns:
    The same message passed as argument.
  (t_ParsertConvertMessage(tjs_dictRR‹tparser((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR‰ˆsRcBsheZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„ZRS(s(JSON format parser for protocol message.cCs
||_dS(N(R‹(R R‹((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR!žscCsr|j}|j}t|ƒr1|j||ƒn=|tkr^tt|d||ƒ|ƒn|j||ƒdS(sÒConvert a JSON object into a message.

    Args:
      value: A JSON object.
      message: A WKT or regular protocol message to record the data.

    Raises:
      ParseError: In case of convert problems.
    iN(R%R&R't_ConvertWrapperMessageR)Rt_ConvertFieldValuePair(R R,RR+R&((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyRŽ¢s
		!cCsšg}|j}td„|jDƒƒ}xk|D]c}y±|j|dƒ}|sh|jj|dƒ}n|ràtj|ƒrà|js¢t	dj
|jƒƒ‚n|dd!}dj|j
dƒd ƒ}|jj|ƒ}n|s|jrõw/nt	dj
|j||jƒƒ‚n||krFt	dj
|jj|ƒƒ‚n|j|ƒ|jdk	r«|jj}	|	|kr›t	dj
|jj|	ƒƒ‚n|j|	ƒn||}
|
dkr|jtjjkr|jjd	krt||jƒ}d
|_n|j|jƒw/nt|ƒrN|j|jƒ|j|
||ƒn—|jtjjkrl|j|jƒt |
t!ƒst	dj
||
ƒƒ‚n|jtjjkrx´|
D][}t||jƒj"ƒ}|dkr|jjd	krt	dƒ‚n|j#||ƒq¹WqåxÇ|
D]C}|dkrCt	dƒ‚nt||jƒjt$||ƒƒq"Wny|jtjjkrÉ|j%rš|j|}nt||jƒ}|j&ƒ|j#|
|ƒnt'||jt$|
|ƒƒWq/t	k
r=}
|r(|jdkr(t	d
j
||
ƒƒ‚q’t	t(|
ƒƒ‚q/t)k
rg}
t	dj
||
ƒƒ‚q/t*k
r‘}
t	dj
||
ƒƒ‚q/Xq/WdS(söConvert field value pairs into regular message.

    Args:
      js: A JSON object to convert the field value pairs.
      message: A regular protocol message to record the data.

    Raises:
      ParseError: In case of problems converting.
    css|]}|j|fVqdS(N(R1(t.0RH((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pys	<genexpr>Áss)Message type {0} does not have extensionsiiÿÿÿÿt.sVMessage type "{0}" has no field named "{1}".
 Available Fields(except extensions): {2}s9Message type "{0}" should not have multiple "{1}" fields.s?Message type "{0}" should not have multiple "{1}" oneof fields.sgoogle.protobuf.Valueis.repeated field {0} must be in [] which is {1}.sAnull is not allowed to be used as an element in a repeated field.sFailed to parse {0} field: {1}sFailed to parse {0} field: {1}.N(+R%tdictR<RNROR2t_VALID_EXTENSION_NAMEtmatcht
is_extendableRRBR&tjoinRzt
Extensionst_FindExtensionByNameR‹tappendR?R0R=RRR>RRnRit
ClearFieldRt_ConvertMapFieldValueR6R7R3tlisttaddRŽt_ConvertScalarFieldValueR8tSetInParenttsetattrRYRAR~(R R$RtnamesR+tfields_by_json_nameR0Rt
identifiert
oneof_nameR,RetitemRI((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR’µs˜
		
		
			
	
	

	
 cCsít|tƒr|rdSy|d}Wntk
rGtdƒ‚nXt|ƒ}|j}|j}t|ƒr‰|j|d|ƒnH|t	krºt
t	|d|d|ƒ|ƒn|d=|j||ƒ|jƒ|_
||_dS(s/Convert a JSON representation into Any message.Ns@types*@type is missing when parsing any message.R,i(R3R•R}RRcR%R&R'R‘R)RR’tSerializeToStringR,Rb(R R,RRbReR+R&((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt_ConvertAnyMessages$
		"cCs|j|ƒdS(s?Convert a JSON representation into message with FromJsonString.N(tFromJsonString(R R,R((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt_ConvertGenericMessage7scCsÆt|tƒr%|j||jƒnt|tƒrJ|j||jƒnx|dkrbd|_n`t|t	ƒr}||_
nEt|tjƒr›||_
n't|tƒr¶||_ntdƒ‚dS(s1Convert a JSON representation into Value message.is"Unexpected type for Value message.N(R3R•t_ConvertStructMessageRkRŸt_ConvertListValueMessageRjRORiR4t
bool_valueR„tstring_typeststring_valuet
_INT_OR_FLOATtnumber_valueR(R R,R((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt_ConvertValueMessage=scCsbt|tƒs'tdj|ƒƒ‚n|jdƒx'|D]}|j||jjƒƒq;WdS(s5Convert a JSON representation into ListValue message.s%ListValue must be in [] which is {0}.RrN(R3RŸRRBRR´RrR (R R,RR¨((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR®Ns

cCsWt|tƒs'tdj|ƒƒ‚nx)|D]!}|j|||j|ƒq.WdS(s2Convert a JSON representation into Struct message.s&Struct must be in a dict which is {0}.N(R3R•RRBR´R<(R R,RRE((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR­Ws
cCs-|jjd}t|dt||ƒƒdS(s3Convert a JSON representation into Wrapper message.R,N(R%R2R£R¡(R R,RR((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR‘`scCsÓt|tƒs-tdj|j|ƒƒ‚n|jjd}|jjd}x|D]w}t||tƒ}|j	t
jjkr¨|j
||t||jƒ|ƒqTt|||ƒt||jƒ|<qTWdS(s5Convert map field value for a message map field.

    Args:
      value: A JSON object to convert the map field value.
      message: A protocol message to record the converted data.
      field: The descriptor of the map field to be converted.

    Raises:
      ParseError: In case of convert problems.
    s-Map field {0} must be in a dict which is {1}.RER,N(R3R•RRBR0RR2R¡tTrueR=RRR>RŽRn(R R,RRt	key_fieldtvalue_fieldREt	key_value((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyRžes
(
RRR	R!RŽR’RªR¬R´R®R­R‘Rž(((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR›s			j								cCs”|jtkrt|ƒS|jtkr2t|ƒS|jtjjkrTt||ƒS|jtjj	kr°|j
tjjkr‹tj
|ƒStj|ƒr©tdƒ‚n|Snà|jtjjkr|jjj|dƒ}|dkr‰y(t|ƒ}|jjj|dƒ}Wn/tk
rBtdj||jjƒƒ‚nX|dkr‰|jjdkre|Stdj||jjƒƒ‚q‰n|jSdS(sBConvert a single scalar field value.

  Args:
    value: A scalar value to convert the scalar field value.
    field: The descriptor of the field to convert.
    require_str: If True, the field value must be a str.

  Returns:
    The converted scalar field value

  Raises:
    ParseError: In case of convert problems.
  sUnpaired surrogates)Invalid enum value {0} for enum type {1}.RJN(R=t
_INT_TYPESt_ConvertIntegerRZt
_ConvertFloatRRRWt_ConvertBoolRRRRSRTt	b64decodet_UNPAIRED_SURROGATE_PATTERNtsearchRRKRLtvalues_by_nameRNROtintRMRARBR&RPRQtnumber(R,Rtrequire_strRaRÂ((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR¡€s6




		cCs}t|tƒr4|jƒr4tdj|ƒƒ‚nt|tjƒrs|jdƒdkrstdj|ƒƒ‚nt|ƒS(s§Convert an integer.

  Args:
    value: A scalar value to convert.

  Returns:
    The integer value.

  Raises:
    ParseError: If an integer couldn't be consumed.
  sCouldn't parse integer: {0}.t iÿÿÿÿsCouldn't parse integer: "{0}".(	R3tfloatt
is_integerRRBR„R…tfindRÁ(R,((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyRº°s
'cCs˜|dkrtdƒ‚nyt|ƒSWnhtk
r“|tkrOtdƒS|tkretdƒS|tkr{tdƒStdj|ƒƒ‚nXdS(s!Convert an floating point number.tnans.Couldn't parse float "nan", use "NaN" instead.s-inftinfsCouldn't parse float: {0}.N(RRÅRAR]R^R`RB(R,((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR»Ås



cCs`|r>|dkrtS|dkr&tStdj|ƒƒ‚nt|tƒs\tdƒ‚n|S(sÞConvert a boolean value.

  Args:
    value: A scalar value to convert.
    require_str: If True, value must be a str.

  Returns:
    The bool parsed.

  Raises:
    ParseError: If a boolean value couldn't be consumed.
  R-R.s$Expected "true" or "false", not {0}.s&Expected true or false without quotes.(RµRuRRBR3R4(R,RÃ((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyR¼Øs
RfRªsgoogle.protobuf.AnyRgR¬sgoogle.protobuf.Durationsgoogle.protobuf.FieldMaskRmR®sgoogle.protobuf.ListValueRtR­sgoogle.protobuf.Structsgoogle.protobuf.TimestampRqR´sgoogle.protobuf.Value(<R	t
__author__tcollectionsRtImportErrortordereddictRTR"R[treR„R†toperatorRtgoogle.protobufRRt_TIMESTAMPFOMATt	frozensetRt
CPPTYPE_INT32tCPPTYPE_UINT32t
CPPTYPE_INT64tCPPTYPE_UINT64R¹RXt
CPPTYPE_FLOATtCPPTYPE_DOUBLERZR^R]R`tcompiletuR¾R–t	ExceptionRR
RRuRRRtobjectRR'RwRcRŒR‰t
integer_typesRÅR²RR¡RºR»R¼R)(((s?/usr/lib/python2.7/site-packages/google/protobuf/json_format.pyt<module>)s„
			»				å0