View Issue Details

IDProjectCategoryView StatusLast Update
0034451FPCPackagespublic2018-10-27 16:48
ReporterAlexey Tor.Assigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version3.0.4Product Build 
Target Version3.2.0Fixed in Version3.3.1 
Summary0034451: FPJson: wish for option foSkipWhiteSpaceOnlyLeading
DescriptionFPJson has this type

  TFormatOption = (foSingleLineArray, // Array without CR/LF : all on one line
                   foSingleLineObject, // Object without CR/LF : all on one line
                   foDoNotQuoteMembers, // Do not quote object member names.
                   foUseTabchar, // Use tab characters instead of spaces.
                   foSkipWhiteSpace); // Do not use whitespace at all
                   
I want to write JSON with separator like this:
  "test": "value",

but code is

  If SkipWhiteSpace then
    NSep:=':'
  else
    NSep:=' : ';
    
so it cannot give ': ' separator.
Wish: add option foSkipWhiteSpaceOnlyLeading, which makes this:

  If SkipWhiteSpace then
  begin
    if SkipWhiteSpaceOnlyLeading then
      NSep:= ': '
    else
      NSep:=':'
  end
  else
    NSep:=' : ';
TagsNo tags attached.
Fixed in Revision40055
FPCOldBugId
FPCTarget
Attached Files

Activities

Alexey Tor.

2018-10-24 11:42

reporter   ~0111535

Was possible to make separators ":" and "_:_".
suggested to add separator ":_".

Michael Van Canneyt

2018-10-27 16:48

administrator   ~0111619

Implemented as requested.

Issue History

Date Modified Username Field Change
2018-10-24 11:41 Alexey Tor. New Issue
2018-10-24 11:42 Alexey Tor. Note Added: 0111535
2018-10-25 12:04 Michael Van Canneyt Assigned To => Michael Van Canneyt
2018-10-25 12:04 Michael Van Canneyt Status new => assigned
2018-10-27 16:48 Michael Van Canneyt Fixed in Revision => 40055
2018-10-27 16:48 Michael Van Canneyt Note Added: 0111619
2018-10-27 16:48 Michael Van Canneyt Status assigned => resolved
2018-10-27 16:48 Michael Van Canneyt Fixed in Version => 3.3.1
2018-10-27 16:48 Michael Van Canneyt Resolution open => fixed
2018-10-27 16:48 Michael Van Canneyt Target Version => 3.2.0